This happens to me too. I did everything to remove that headphone calls as i have to connect headphone to listen calls and music. I was fed up of this issue and i flashed cm13 rom but the problem existed. So i understood the problem is not with os. After 2 days it was alright and not faced that issue. My devices was mi4i running on MIUI global beta ROM.