Revert "Merge branch 'master' into pattern_refactor"

This reverts commit cdfd74984ef9d02851d8096d1341c4c9931f8d86, reversing
changes made to fddfc21a033e2e9799f95a1230fd02cb850f37a2.