[DF-1476] Fixed MacOS compilation of Templates