URI template encoding ignores mismatched curly braces, treating them as literal parts instead. Issue: SPR-17630