If you include an element before calling extend(), the parent view will be assumed to be an element instead of a view/layout. Fixes #3248