pass the template when processing parent

Otherwise it somehow gets lost sometimes for following blocks. I have to admit that I'm not 100% certain that this is the right fix, but it does cause things to behave correctly (instead of crashing) for me.