fixed complex bug with recursive partials and layouts