Restore context opacity after drawing layers

Closes #2455
Merge pull request #2455 from fredj/2455

Opacity of last layer is used in postcompose drawing