Issue #2221755 by grom358, ianthomas_uk: Remove uses of deprecated Element functions.