Do not create a shape object outside of the layout context