Normally they ground to the dipstick holder, along with the major ground from the battery. Moving them to the firewall actually moves them farther from a major ground and through another connection or two. I put an extra ground from my battery to the body (front clip), and ran an extra ground from the TCU ECM ground at the dipstick holder to the firewall, just soldered on a piggy back ground. Check the ring connector on your TCU ground at the dipstick, mine was green, I replaced it and soldered it, it was just crimped on, the ECM ground was already soldered..
Jneary said there is recommendation to move the grounds for the ECM and the TCU to the motor side of the battery ground connection at the dipstick.