Avoid detached HEAD in submodule