Patch for https://github.com/ocpsoft/rewrite/issues/117
Test case for https://github.com/ocpsoft/rewrite/issues/117