Fix crash on opening submodule

Additional related fix.