Blender to Unreal weird pants weight

This is definitely not my first time importing a character to Unreal Engine without something going a bit haywire. But I have not experienced this one before. The pants don’t follow the rig like it does it Blender. My export options are the same since forever and this hasn’t changed before. I thought maybe the pants were weighted to the root or something but nope. I tried duplicating the vertices of the pants and adding them from scratch with automated weight but nope. I’ve tried merging them with the lower legs and still they do this. I have applied scaling and location etc. What else can I try?

Finally I found the problem. The cause was the weight of the pants also being distributed over another bone. I removed all vertex groups I knew weren’t possibly needed and then it worked… however it messed up the final blend of the pants so I have to redo it.