gear_gc_protect now uses a counter instead of a boolean flag.