Fixed consistency issues with main roles. Now it should be impossible to reach an inconsistent db state (even when tricking the ui by disabling js). Also, the main roles are now properly seeded.