BUG: AverageWithHFields bugs were corrected
-Modifications had been forgotten after moving form 4.1 to 4.5
-There was a bug with a variable not set (TemplateImage) for scalar images.
Merge branches '4.5-AverageWithHFields-bug-after-mv' and 'master'