I have a world created in 18w30b, and 18w31a definitely fixed it for me. I'd get 1 out of 5 entities or so freezing, (at least it seemed to be that often, I was always reloading the game), and now with 18w31a and the same world, it hasn't happened once. And I've killed probably 75+ pigmen already.
BTW, a way I've found to reliably trigger it quickly is get flying, and spam rockets while "snapping" your view up and down quickly.
This appears to have been introduced in 17w43b. It is not present in 1.12.2, but it is present in all snapshots up to and including 18w14a.
Still an issue in 18w14a.
The bug occurs even if all blocks surrounding the bed are air blocks.