Future reference for anybody that ends up in the same situation:
The chain brake is on the cover that is removed to change the bar &/or chain. The brake handle is on the body of the power head. If the brake is engaged when the cover is removed the brake band tries to stay with the drum on the body of the power head instead of coming off with the cover. Also the sprocket that links the brake controller to the brake handle gets out of sync with the handle. Due to the springs in the action, when the brake is engaged and the cover is taken off, the sprocket turns further than the socket it should fit into. Both have to be put into the disengage position before the cover is put back on. (They can also get out of sync if the brake accidentally pops while the cover is off. Drop the cover, it will pop.)
Easy fix is, while the two parts are separate, push the brake handle to the disengage position. Then take a pair of pliers and turn the sprocket to disengage the actual brake. If you turn it the right way it will pop into position. Looking at the sprocket it is easy to determine which way to turn it. Once both are disengaged they line up and allow you to put the cover back on.
KaptJaq
EDITED for spelling & grammar mistakes.
Ah shuda paid tention in skol.