Just updating this as I go... this is F’d up: caching the Wayfinder call causes it to output nothing.
This returns nothing:
[[Wayfinder? &startId=`0` &outerTpl=`1main_nav_wrapper` &innerTpl=`parent_folders` &includeDocs=`[[!listChildIds?&parent=`0` &depth=`2`]]` &cacheResults=`1`]]
Whereas this causes the menu to be generated correctly (not cached):
[[!Wayfinder? &startId=`0` &outerTpl=`1main_nav_wrapper` &innerTpl=`parent_folders` &includeDocs=`[[!listChildIds?&parent=`0` &depth=`2`]]` &cacheResults=`1`]]
Removing the sneaky pump-priming arguments to "includeDocs" DOES work, but removing that makes the call too slow to be usable.
[[Wayfinder? &startId=`0` &outerTpl=`1main_nav_wrapper` &innerTpl=`parent_folders` ]]