FLEX-34456 Added a unit test which reproduces the bug.