fix bug in LIKE/NOT LIKE pattern matching
closes bug MB-8703