I'm replying to my own post, in case it serves anyone: this bug on the Fairphone 2 is with the newer Fairphone camera module only. So I put the first generation camera module inside (I still had it in a drawer somewhere) and now the phone turns off fine. I don't care much about camera quality on this device anyway.