Stefan,
I think you make an important point here.
What I would say in response is that the individual organism does not, itself, discriminate when interacting with the environment. Rather, the discrimination occurs over a generational timeline as the replicating lineage presents its templates (i.e., its individual organisms) to the environment. To explain... the consequences of survival pressures on the survival of a lineage's individuals make each individual, effectively, an interactive mechanism that serves to measure the merits of that individual's functional template in respect to the survival of the lineage. The discrimination is a generational process instituted by replication over a generational timeline. The consequences are physiological adaptations in which the lineage evolves increasingly complex discriminatory mechanistic individuals.
Of course, Carlo did not say this, but I am suggesting a solution to this issue.
Conscious agency in individuals is a feature of more complex interactive mechanisms which the mathematics does not address but I do believe that the mathematics can be extrapolated to do so.