Reduce max length for custom actions to 400 bytes because some regexes are very slow. See issue 3056 (manual application of e57f245 since cherry-pick failed)