Adding a new test inspired by issue 5237