Apparently the Minecraft client separates the skin file into squared chunks surrounding 'jacket layer' (aka helm/hat layer, 2nd layer, ...) parts:
Looking at the 'jacket map' above, if any of the squared areas in the skin file is fully opaque, then the underlying jacket part will not show up in game. As soon as there is at least one transparent pixel in a square, that jacket part will show up in the game.
This behavior is very confusing, not intuitive and AFAIK not officially documented.
The expected behavior would be rendering the jacket layer even if a part is fully opaque.
Unless you're okay with a breaking change or re-processing all uploaded skins, you would still need to check for at least one transparent pixel in the whole skin file (to make sure the designer was 'aware' of the jacket layer and to support legacy skins). Otherwise some skins, including Notch's, would result in a fully opaque (not intended) jacket layer (or at least hat layer for < 1.8 skins)