make PatternCompiler use the packaged grammar if possible (more bpo-24960) (GH-5034) (#5037)

(cherry picked from commit e5f7dccefaa8d97ab53b3051acbb4a4d49379dc4)
1 file changed