Don't crash when asking repository to resolve non-existing refs