I went behind a brick trellis once over a road and since it was only 150 feet away, I figured no big deal being close by, but it took off much the same as yours with the camera also looking down at one leg. Seemed like the electronics just crashed. I recovered by switching into ATTI quickly and flying it manually but it shook a lot. Another when I was in 'Track Me' (or whatever it's called) and the camera went limp and it took off at high speed losing track of me to who knows where, but I recovered it again by switching out of P mode. This was on version .600 if it matters.
I chalk it up to being DJI built and prone to sundry software and firmware issues. Add some issues at times with the tablets losing connections too.