Add clearer invariants to composite spec mixing

No functional changes, just makes the code clearer and makes it easier to catch future bugs.