The Gouy-Stodola Theorem revised