In-progress work on refactoring inference not to use exceptions.