Reverse ordering of SQL permissions in dump files. Fixes #1175