...
This is the really messed up version that can't even do sorted-flatten properly.