This isn't related to the fix but I wanted to pull it in since it has received a lot of work and the tests pass.