Added test for issue #2509