Correct several "deprecated" warnings from macros.

Follows closing #17185.