Resolve migration dependency issue for memberships and directories.