Fix getLoadedOntologies to properly work with the new security layer.