Likely caused by the new crouching features, I.E. being forced into crouch when a trap door is closed above you or if a piston pushes a slab on your head, when swimming in the swimming animation against a ceiling, the game forces you to crouch, kicking you out of the swimming animation. Noticed this when I was ocean-ifying my underground base. Going to the ceiling consistently kicked me out of the swimming animation, causing movement to be incredibly difficult.
Reproduced by swimming into a ceiling underwater.
Environment
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_51, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Duplicate of MC-148627