Titans has it - "dead" button in Player B's seat, C pays the small blind, D pays the big blind. This means that A effectively gets the button two hands in a row, but them's the breaks.
Easiest way to work it out is actually to move the blinds first. C had the big blind last hand, so D must have it this hand. C had the big blind last hand, so they must have the small blind this hand. Once that's sorted, just put the button one seat behind C, even if that seat has just been vacated.
When there's more than two players left in the game, a player can never have the button and a blind.
The real fun starts when one more player goes out and you've gotta work out where the button goes to start play heads up