I just went through this exercise last night, my sending unit worked just fine for the last couple years and then I had an out of jeep experience that burned up my wiring harness. None of the re-wiring work was on the sending unit or gauge but apparently it was close enough to offend the sending unit. I ended up doing the same as you, pulling the sender, and verifying the electrical connections and function, all was good until I started tightening the screws that hold the sender to the tank. When I tightened the last one it put enough torque on the sending unit head to bend the head it in some way. I ended up rotating the whole unit 180 degrees, re-inserting the sender with the float pointed to the driver side of the vehicle, then all of the screws went in straight and clean and the unit worked just fine. Really weird.