Fix EZP-23644: add proper handling for hidden nodes in subtree fetches a...

...nd multiple locations
Tested on 5.3 and 5.4