Fix bad AMD conversion referencing globals

Refs #12863, #17829

(cherry picked from commit 1fee2371205ed90bfbb48faf393758dfe0268ff3)
(cherry picked from commit 27533ab2144f77ecd5baebc7be1b079ca2446aef)