libctf: handle errors on dynhash insertion better