Well, the use case is pretty different, so there's no real need to make them consistent.
An overlay requires a clear indication of how to back out because in this case pressing the back button would take you out of the thread completely which isn't desirable.
The exclusion of the cancel button everywhere else is actually explicit; in the templates which load in an overlay, they can theoretically be rendered in a normal page, too (such as if you open the link in a new tab), we explicitly give the button a special "OverlayOnly" class in most cases which would make the button only show when rendered inside an overlay.
Everywhere else the navigation would be done by using the browser's back button, or even better the breadcrumb navigation. Obviously there's no breadcrumb on the overlay so that's another reason why the cancel button is required there.