ERT-437: Added "if (data->use_prior)" guard around access to the data->active_prior field.