Until we support dynamic queries (#29760, currently out of scope), the 1st part of the query pipeline will never be invoked in AOT mode. This means we can strip it out to reduce application size. We'd probably do this via a feature switch. This feature switch could be activated automatically when publishing to AOT.