Fixes #4353 - plugins don't create permissions until DB is migrated