Fixed a bug where a parent of an already memo matched node could also be
matched.