sort keys when we process a mapping

So callbacks get reliable set in 'result' argument.