Modified scoping for PatternWithAction to ensure variables bound in pattern and in when clauses are all visible in body, resolves issue #309