Require firstKey and lastKey on IntMap tail-recursive.