Test submodules with empty index or orphaned head

In both of these cases, the submodule data should still be loaded just (obviously) without the data that comes from either the index or the HEAD.

This fixes a bug in the orphaned head case where the error was not ignored.