Sorting Mopup

Fixed a bug in the sorting caused by unbounded recursion when LIST(x) is encountered, and added code to trap otherwise uncovered cases for sorting and generate an ElisionException if these are discovered.