According to what my local Level 2 AASP told me, the latches are easy to break off if you try to "straighten" them and since they're spotwelded, cannot be repaired. It is a common issue when care is not exercised opening the MBP's. Replacement of the part, called the "top case" is the only surefire solution.
You can, of course, purchase the part from Powerbook Medic, iFixIt or other providers. I think you will have to purchase a new keyboard as well, cause it is held by adhesive and very difficult to unstick and transfer over to the new top case without it having future issues. The trackpad can be transferred without undue issues.