I came across this bug when I pressed F5 whilst I was riding a minecart, I was going along the the track (which was in a 2 blocks high and one block wide) in F5 mode and the camera position was behind me when the minecart went round a tight corner and I went through the wall slightly which is normal but when I came out of the wall I was in first person mode again.
I would like to add that it only happend when I went around corners and it didn't do it any other time.
Thank you for reading this bug report.
Dupe of MC-128