Make sure that ids are unique in arrays and subschemas