gts: fix as-needed bug