* Since we use recursion we cannot make sure a path ends with an ElementExp or AttributeExp.
*/
private static void buildPaths(MSVExpressionVisitorChildren visitor, List<List<Expression>> paths) {
List<Expression> waytoresearch = paths.get(paths.size() - 1);
Expression endpoint = waytoresearch.get(waytoresearch.size() - 1);
List<Expression> children = (List<Expression>) endpoint.visit(visitor);
if (children.size() == 1) {
Expression child = children.get(0);
waytoresearch.add(child);
if (!(child instanceof ElementExp) && !(child instanceof AttributeExp)) {