Fixed a bug in the Visitor module.

The visitor was not saving binding environments correctly when it
was testing patterns.  As a result recursive calls to visit would
cause the wrong environment to be used when resuming the caller.