Fix cornercase tracebaxk when detecting whether submodules changed