[PATCH] Avoid building object ref lists when not needed