On 2016-12-17 Sat 12:42 GMT-0800, Hong Xu wrote: > > I've added the tests now. And indeed, it exposes a bug in the original patch. > > Again, I decomposed the patch to two different parts, one for the stable > branch and the other (with only test files) for the master branch. > Attached is a newer version which has fixed a few edge cases.