It was a bug uncovered by my test suite.