#22986 stricter checks to ensure context.entity never contains project