Fixed NullPointer in DiscreteCostAnalysis

Fixed problem in section of code where the layers are combined caused by
a call from when the layers were stored in a List instead of a Map