Record layout X matches this record but one or more 'occurs depending on' items are invalid

The current record matches the conditions in layout X, but also contains an OCCURS DEPENDING ON item that specifies a value for the array outside its declared limits.