Fix test
Remove unnecessary inspection of prototypes
Attempt to minimise traversal of ASTs

This is done by using enterNode where possible, and allowing visitors to mark
themselves as finished. Once all visitors are finished, the traverser returns
quickly without further traversal.