needsgc: switch to check_and_set_needsgc