The troll's head exploded, like a gearbox shifted without a clutch. The troll's "hardwiring" is equivalent to a lack of clutch: he cannot disengage from one notion/paradigm/gear, and so he cannot engage new ones.
Upon seeing Dogbert wearing the hat the wrong way around, the troll could not make sense of what seemed to be a hat used in what seemed to be a way a hat could not be used. He could not shift his mind to a new paradigm that included hats worn backwards. Trapped in the paradox of seeing a hat in a non-hat role, his head exploded.
Biges: I googled paradigm shift & this is one of the definitions that I found:
The term "paradigm shift" has found uses in other contexts, representing the notion of a major change in a certain thought-pattern — a radical change in personal beliefs, complex systems or organizations, replacing the former way of thinking or organizing with a radically different way of thinking or organizing
I think what happened was that the accounting trolls, who would normally react by having their "brains explode" just by looking at Dogbert's backwards hat, decided that they didn't mind seeing the backwards hat after all if it meant having to release Dilbert.