Fix bug in tests introduced during refactor.