Replace two asserts with one assert(set, set)