Fixed issue with rendering nested layouts more than once.