Fix relateditems viewlet (tal:repeat is executed after tal:define).