ancestry.lua: fix characters in pattern matching