Add test for issue523.