Revert the change in order in the constructor

The extra headers MUST be defined and in place before details of the plugins are grabbed, so that the headers are correctly populated.