Re-add directive template fixes lost in the merge [story:41481113]