public static ComplexResourceKey<?, ?> fixUpComplexKeySingletonArray(ComplexResourceKey<?,?> complexResourceKey)
{
RecordTemplate key = complexResourceKey.getKey();
DataMap dataMap = key.data();
for (RecordDataSchema.Field f : key.schema().getFields())
{
DataSchema.Type type = f.getType().getType();
String fieldName = f.getName();
if (type == DataSchema.Type.ARRAY && dataMap.containsKey(fieldName))