If you have the SEO package installed then the typoscript you mentioned for lang still applies, that means the two @if conditions will be applied to your lang attribute as well.
I suggest you clear the configuration before setting it:
lang >
lang = 'en-US'