Issue #2765729 by Berdir, geerlingguy: PathautoPattern->applies() exponentially slows down operations with large numbers of nodes