Fixed bug with recursive layouts