Replace deprecated warn-on-reflection with global-vars