Thanks for tracking that bug down and for the reproducible test case. It was a typo in that refactoring commit; sorry about that. I installed the attached patch into master to fix things.