Fixed bugs in TPVisitor for bound variables and record names