[FIXED JENKINS-26119] - Restore the legacy variable escaping approach