Pattern matcher: some more QuoteLink fixes

Expand the unit test a bit, and fix some unexpected bugs.