Improved backwards compatibility of template tags rationalisation
Fixed missing import