"If 'harm' is defined in terms of thwarting human desires, it could rewire human desires. And so on."
...not if humans desire for their desires to be preserved, which they do.
The human desires to preserve their desires are no match for a superintelligent machine with a completed human neuroscience at its disposal.
I wrote a new Singularity FAQ for the Singularity Institute's website. Here it is. I'm sure it will evolve over time. Many thanks to those who helped me revise early drafts, especially Carl and Anna!