Fix problems with circular imports of permissions.

(AttributeError: NoneType has no attribute add_to_class)