[PATCH 5.0 2/2] perf/core: Fix corner case in perf_rotate_context()