i think this is a feature as its been in since when rails where added
this has been reported multiple times and btw it dose not mater what block it is (including air) if your head is between 0.5 - 1.5 blocks below the water/lava you will get the underwater/in-lava effect but
Confirmed
this bug still exists in 1.9.2