Fixed a bug in _sort

Previously, if the parameter to _sort returned an empty value, it would
throw an exception.  It now silently swallows the error -- still wrong,
but better.