Handle order-by with classes that have inline views for table_name

This fixes https://rt.gsc.wustl.edu/Ticket/Display.html?id=99411 on the UR side.