Fix dictionary regex freeze (fixes #14)

Copied from Python.tmLanguage