For some reason I left this tab open in the background and forgot to actually read it for 4 days. Anyhoo.
I think the best possible patch here would be to replace if (a->gender == b->gender) return 0; with if (a == b) return 0;. Hopefully the opcodes for that (should just be a SUB a, b followed by JZ?) are equal to or shorter than the load with the offset + compare. Then swap out the message for one about self-marriage, and you’re done. :)
if (a->gender == b->gender) return 0;
if (a == b) return 0;
SUB a, b