Issue #16564: Fixed a performance regression relative to Python 3.1 in the
caching of compiled regular expressions.