Added a test case for #2790