Fix detection of mismatch between array/object