This happend to ungrouped channels and in the case other Actions are
also visible in the Dopesheet (e.g. by having multiple objects
selected).
We are going over the `bAnimListElem` nested / twice:
- once in `animchannels_rearrange_exec`
- then again in `rearrange_layered_action_fcurves`
The inner workings are tied to specific actions from the first loop, but
we are going over FCurves possibly contained in **other** actions in the
second loop. Doing this with the "wrong" action goes wrong (e.g. in
`get_group_or_make_fake` where we try to get a channelbag for an FCurve
slot handle in the "wrong" action).
So to resolve, skip `bAnimListElem` if its action does not match the
action passed into `rearrange_layered_action_fcurves`
Pull Request: https://projects.blender.org/blender/blender/pulls/138193