Move code around to satisfy t/stest linkage