`/\]/u` is getting optimized to `/]/u` which produces `Parsing error: Invalid regular expression: /]/: Lone quantifier brackets`.