fix another crash due to calling toType on an RType containing holes