fix clear_refs
use of exp_golomb_long (it is not in the critical path)