Add test case for bug #510270