fix bug with caching visitors

Apparently if we actually cache BasicVisitor like we were supposed
to be doing in all cases regardless of whether the visit method
is overridden, it breaks the unparser. Not surprising, but it still
needs to be fixed. Hence, NonCachingVisitor.