Process recursive markup correctly