If calling `getDescriptor().getMaxDefinitionLevel()` for each candidate match is too expensive one could also buffer that since that should be constant if I understand correctly(?).