[1030889] Added checks for expandable elements