Previously these fields were only read from this header for cursors, while Planes was hardcoded to 1 for icons (with a comment that it was unknown why this was needed) and BitCount was left at the value read originally in the RESDIRENTRY.
This fixes the single byte that was differing for the icon/cursor test compared to rc.exe.
This is based on research/testing by Nico Weber.
Most icons also store two bitmaps (the mask and the "color"). I wonder why this adjustment is needed only for cursors.