What did I do wrong?

Machine one or the other and fugedabowdit. Do not compromise the pattern for clearance. Make sure you cut enough.
I would take it off the pinion,cuz obviously (to me at least)it is the faulty piece.This way if you ever decide to sell it, it will fit with the next guys parts.

Oops, I didn't see page two! Glad to see you got it figured.