Fix dictionary regex freeze (fixes #14)