Issue with strange faces around joints
Select everything in edit mode and hit Ctrl-N to recalculate the normals on your object. It looks like some normals are facing outward, others inward. That is why flipping the normals didn't fix your issue, as it flips them all, and you still had some facing in and some out.