https://openacs.org/forums/message-view?message_id=17672
It describes the case that failed, which involves UNION as well as ORDER BY. Sorry I didn't get back to your e-mail earlier...
Try Dan's example with and without the explicit name...