The command 'fill [coords] water replace air' replaces stairs, slabs etc. with their waterlogged counterparts (or sets their waterlogged tag to true).
The command 'fill [coords] water replace air' should only touch air blocks, so the bug is that it is having an affect on blocks that it shouldn't. cobblestone_stairs is not air.
Going the other way ('fill [coords] air replace water') does not remove the waterlogging (third picture).
Images and a sample world attached.
Please do not create copies of your own tickets.