submodule: fix latent check_has_commit() bug