Modified signature of detectStructureAtLocation