By the ones nowhere near her turning freaking levers that's how. Dragon's aren't stupid. She actually stopped fighting the qunari surrounding her to spew acid in my face. That's when I reloaded and lol leaping shot her ass to death. Stupid dragon.
Because a dragon knows what levers do/are. Stand in a cage trying to free an angry wounded bear and it's going to be trouble, foolish to expect otherwise.
I had my team hold their position while I worked to free her...of course they still ended up attacking the dragon anyway. I freed her, though, it was worth it for me.