Only generate prefix matcher once.