Wow, that was fast. Thanks!
edit: I'm curious, what set of conditions were causing it to fail? Something relevant had to differ between her record and mine, but I can't think what it might be.
Most likely your corruption value or your friendship value with Malayna! As far as I could tell the bug couldn't occur unless you were in angelic form. And also shouldn't be able to occur if you were locked into a relationship with Malayna.
That said though it's been so long since I made all this it's hard to tell for sure now. Looking back on scripting I did 5+ years ago is a mess. Wahaha.