fixed a bug in pattern matcher related to the evaluation of data structure lookup; updated tests