Lifting duplicate code hazard in patternCopy and patternCheck.  See <https://info.ravenbrook.com/mail/2014/06/04/14-41-06/0/>.