Move request header doesnt work

Hello Tyks,
am encountering an issue with the movement pattern of a header indicated in this link:
https://tyk.io/docs/frequently-asked-questions/rename-or-move-existing-headers/

"global_headers": {
    "X-New-Custom-Header": "$tyk_context.headers_X_Custom_Header"
},
"global_headers_remove": ["X-Custom-Header"],

While looking at the code, I don’t understand how this could work because, as seen in the following excerpt from the mw_modify_headers.go plugin code, the header is removed before replacing the value of the new header with the one previously removed. Am I misinterpreting the code?

plugin code : https://github.com/TykTechnologies/tyk/blob/master/gateway/mw_modify_headers.go

Thank you for your response.

Ok i’m sorry, after debugging tyk for found the problem, i have found, you need to enable “enable_context_vars” as root tyk defintion, see documentation:
https://tyk.io/docs/context-variables/

thanks tyk