Prevent a stack overflow when in laying out the views