Miguel Ruiz Velasco interested in the patch and the test case reproducing it. You can either try to put together a pull request or attach the test case and the fix to this issue.
Thanks!