Composite key's with $n=1 and null value(s)

Changed to array_key_exists in case an index is null. #3408