This was initially reported in https://www.mediawiki.org/wiki/Topic:U5si2k4hihxy7dq4,
In the diff found here, it could be seen that I have only removed 3 items of the 4 item list. The corresponding visual diff shows that I've removed every item of the list and added a new item although there's no difference between the corresponding item that has been removed and the one that has been added.
Also, the items inside <code> tags aren't being affected by the red/green background. I'm not sure if it's okay, just noted it.