fix type rule to not recurse forever

thanks @maxbrunsfeld