New version for debugOnly and collection-instances rewrite