Fix star mapping, aliasing, and pathing for built layers.

Fixes #17475
Make SimpleQueryEngine sort Dates correctly

Fixes #17068.