add support for array returns in element query
fix aliasing to a node that does not yet contain children