That gear should be on a tapered spline. IIRC
The nut may be bottoming out before it pushes the gear back enough to tighten. You may be able to make a washer to put in there to tighten it up. It could also end up being worn bad enough alignment is thrown off and good used parts may be in order.