Replace usages of AssertLegacyTrait::assert(No)Escaped, that is deprecated