Add tailrec check for RichRange and add more tests