add to comment
After much printf debugging, I have convinced myself the behavior was right all along and the tests were wrong. :/