MULE-7524: Encoded characters not working when using expressions for dynamic endpoints

_ Reverting previous commits
(cherry picked from commit 88b6f34)