fix variable reference to fix --enable-profiling (closes #17550)
3 files changed