That's not a consequence of the 2nd law of thermodynamics, that's simply the symmetry of second derivatives [also known as Schwarz theorem, Clairaut theorem or Young theorem] which is valid for any mathematical function of state. By this method, the extremely useful Maxwell relations can be derived for a single system.
No mathematical or physical overdefinition issues observed here.