MODE-2297 Corrected getNodes() functionality

Changed the tests to always check the query via rows and, if there's only one selector in the query, also by nodes. Fix a problem when getting the nodes on some queries.