rm some dead code, and add a test for bug #33551