Fix handling of patterns in cmt files