For layout-managed-subsite it only checks the layout-managed-subsite folder for duplicate names so you can mount things at /pvt /register etc and break the site.
It should do something like what rp_handler does with apm_package_url_resolution (or better refactor rp_handler so it can do exactly what the rp_handler does).