A list of length equal to whatever maxint is is something you would have to set up on purpose. (If it were naturally occurring and unpredictable, then you would need to handle the much more common case where the length of the list is greater than maxint, too.)
The fact that a weird situation you set up intentionally needs special-purpose handling doesn't seem odd or unreasonable to me.
The fact that a weird situation you set up intentionally needs special-purpose handling doesn't seem odd or unreasonable to me.