Ha, crazy that Kenji's pull fixes this problem, and I've only been running into it for a day or two now. Couldn't be timed better. 

I'll remove the changes except for the unittest in a bit (and change the unittest as per @monarchdodra's recommendations).