Commit 1123 also fixed #5120. Added test.