path.add(new VariableRef(propPath[0], name));
String[] expr = property.getExpression().split("\\.");
for (int i = 1; i < propPath.length; ++i) {
Property[] nestedPath = new Property[i];
System.arraycopy(propPath, 0, nestedPath, 0, i);
path.add(new VariableRef(new NestedProperty(join(expr, ".", 0, i + 1), propPath[i], nestedPath), name));
}
} else {
path = Collections.singletonList(new VariableRef(propPath[0], name));
}
return path;