Fix build without Grantlee
REVIEW: 126155 (cherry picked from commit 72add0f00cae09925a6b7693779e5b896206db00)