Limit the selectable file types depending on the element type (see #7003)