Android files (Java and XML) being replaced by weird XML [duplicate]
I didn't uncover the root cause of the issue, but following Yashasvi's prompt and the fortunate timing of Android Studio v3's release (5 days before my question on 2017-10-25), I upgraded the software and everything has been working fine since.
Not the most satisfying conclusion to my question, but the my code isn't being screwed up and I'm happy.