Fix bug with empty expressions, and expressions providing an empty path in the tree.