Improved discriminator escaping support.