I am happy you have found this problem. Let's try to find a more clean solution to this.

First of all, I would move the logic in ```RiskCalculation#output_container_builder``` to the base risk calculator. I think that ```RiskCalculation/HazardCalculation``` should not be more than "records". Logic implementation should go into the calculator.

This would allow us to easily change the wrong assumption made by such method, i.e. that there is one output containers per hazard output. Instead we could have also some "statistical" output containers per each risk calculation.

So, I would make the new function return a tuple with two elements: a list of statistical output containers and the dictionary mapping hazard output to output containers. Then, each calculator could have a method ```create_statistical_output_containers```. What do you think?