Prevent infinite recursion when updating submodules