Fixed bug in UNION logic

Sort order is now applied as the first scan range for intersection with
the smallest result set.