This test was kindly provided by Jan-Erik Rediger (@badboy here on Github) that discovered the issue. See issue #2846.