code: private Expression correctClassClassChain(PropertyExpression pe) {
          LinkedList<Expression> stack = new LinkedList<Expression>();
          ClassExpression found = null;
          for (Expression it = pe; it != null; it = ((PropertyExpression) it).getObjectExpression()) {
              if (it instanceof ClassExpression) {
                  found = (ClassExpression) it;
                  break;
              } else if (!(it.getClass() == PropertyExpression.class)) {
                  return pe;
              }
              stack.addFirst(it);
          }
          if (found == null) return pe;
  
          if (stack.isEmpty()) return pe;
          Object stackElement = stack.removeFirst();
          if (!(stackElement.getClass() == PropertyExpression.class)) return pe;
          PropertyExpression classPropertyExpression = (PropertyExpression) stackElement;
          String propertyNamePart = classPropertyExpression.getPropertyAsString();
          if (propertyNamePart == null || !propertyNamePart.equals("class")) return pe;
  
          found.setSourcePosition(classPropertyExpression);
          if (stack.isEmpty()) return found;
          stackElement = stack.removeFirst();
          if (!(stackElement.getClass() == PropertyExpression.class)) return pe;
          PropertyExpression classPropertyExpressionContainer = (PropertyExpression) stackElement;
  
          classPropertyExpressionContainer.setObjectExpression(found);
          return pe;
      }
docs: and class as property