Blender to Unreal weird pants weight

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.