Add test for SF#538.