Fixes for query() + caching length
Fixes for query() + caching length

query("noSuchElement existingElement") would return existingElement and not [].
Also, cached length earlier so it could be used for another for loop.
MateyY/mScript