Issue #2950643 by dalin: Implementing hook_pathauto_pattern_alter() causes random incorrect paths when aliases are bulk (re)generated