Here's a test for the original problem, which is also fixed by the preceding patch: