fixed a bug in generic_visit that caused visit to be called on tuples instead of nodes