Fix wrong node order when rendering nested directives