eliminate a bit of redundant tree removal code