Animation unwantedly being trimmed

Hello, I don’t know what I did, but for some reason my animation is looping inside this segment, ignoring all frames after this selection.

Does anyone know why the rest of the “timeline” bar is greyed out and how do I fix this?

OK, I just fixed it by adding a keyframe for the second animated property (“Sleep : Game Object.Is Active”) in the end of the animation. But I’d still like to know why this happened, why did the second object determine the animation duration while the first one apparenly is irrelevant?