Is the wikipedia article on 3b4b encoding in 8b10b encoding correct?
The standard 8b/10b encoding for Ethernet is found in IEEE 802.3 clause 36, table 36-1a:



The disparity effect of the 6b/5b part of the code and the 4b/5b part of the code have to be considered together.

For example, for input code group D0.0, if running disparity is negative we use a 6b/5b code with +2 disparity and a 4b/5b code with -1 disparity to get an overall +1 disparity for the 8b/10b encoding. (and similarly -2 and +1 disparities if RD is positive)

But for code group D17.0, we have a balanced code for the 5b/6b part and for RD- we use a +2 disparity code for the 4b/5b part or -2 if RD is positive. 

So sometimes the 4b/5b code acts to restore the overall running disparity, but other times it acts to increase the running disparity, but it's balanced by the 5b/6b code.