This call ends up using the `repo` parameter before the `assert` below that validates it. Frankly, the asserts are just used to guard against programmer error, but there is no point in even having the assert if we use `repo` before asserting.