diff --git a/domain/modelling/optimisation/optimiser.py b/domain/modelling/optimisation/optimiser.py index 4a5edd28e..73f5e9a1a 100644 --- a/domain/modelling/optimisation/optimiser.py +++ b/domain/modelling/optimisation/optimiser.py @@ -260,10 +260,9 @@ def optimise_package_fabric_first( # with the phase-1 overlays, so candidates are valued against the # fabric-applied dwelling and the resulting package score stays the # truthful whole-package figure against the original baseline. + consumed: set[int] = _used_group_indices(groups, fabric_package.selected) remaining_groups: list[list[ScoredOption]] = [ - group - for index, group in enumerate(groups) - if index not in _used_group_indices(groups, fabric_package.selected) + group for index, group in enumerate(groups) if index not in consumed ] post_fabric_scorer = _PrefixedScorer( scorer, [scored.option.overlay for scored in fabric_package.selected]