Revert "Re #7204. Move definition of varible closer to where it is used."

This reverts commit ed0163f88970d681096d54340ad11d7b1d6f444b.
Re #7204. Move variable definition so that Framework build sees it.
Merge branch 'bugfix/7204_framework_only_build' into develop