I'm working on a model/animation Maya exporter for a game I'm working on. I used a very simple animated box mesh with four joints at first to make sure everything works, and got it running relatively easily. However, now that I'm loading a more complex model, I've come across an issue where joints are flipped (somewhat) along the x-axis.
Below is the model in Maya, the arm on the left is swinging forward.

Here is a view of the joints in-game. The red spheres indicate the LEFT shoulder and thigh. The green indicate RIGHT shoulder and thigh, while the blue is the root hip joint.

Please note that in Maya, these joints are reversed. Green should be on the left, and red on the right.
Any idea what's causing this? I've checked my skeletal hierarchy in-game and everything is connected as it should be, and the matrices seem to be correct. It's causing some issues with my smooth skinning, as you can somewhat see in the background of the second picture. It's almost as if the vertices are referencing the correct joints if they weren't flipped, even though the hierarchy is correct.