Why doesn't MoveKey allow moving to time 0?

I have a curve with one keyframe, say, at time 3.
When I try to do

newframe = new Keyframe(0, oldframe.value);
curve.MoveKey(0, newframe)

it simply adds the new frame at curve.keys[0].time, which (according to the documentation) is what should happen if there’s already a keyframe on the curve with time 0, but that isn’t the case here (since the only keyframe is at time 3).

I can work around this by simply removing the existing keyframe and adding a new one, but I want to preserve the keyframe indicies. Given that, a workaround is to remove all keyframes, then re-add them in order (with the move manually applied). What would be very nice is if this actually worked as expected, and I didn’t have to do that. Is there something else I need to be doing for this to work properly?

Note that MoveKeyframe works fine for all other times I’ve tested, just not zero. I can, however, adda new keyframe without a problem at time 0.

It turns out that this only happens when there’s exactly one keyframe on the curve, in which case I can simply remove and re-add it with time 0 - there’s no order of indices to be preserved and so the problem is “solved” for now.

I still wouldn’t mind knowing why MoveKey(…) doesn’t seem to allow moving a keyframe to time 0 when there is only one keyframe, though.