I somehow made a typo in the code and also wrote a test that matched the wrong behavior :)
Created attachment 217160 [details] proposed fix
Committed <http://trac.webkit.org/r159392>.