fixed a bug in pattern matcher related to the evaluation of data structure lookup; updated tests
Merge pull request #717 from yilongli/fixing-issue-#710

Fixing issue #710