[fix][#30205] findmanifest should prioritize main folder manifests

Fix already merged into the platform:
https://github.com/joomla/joomla-platform/pull/1842