Fix converting related records to arrays.