Fixed #2433: Add test case for this fix