[1.7.x] Fixed #23098 -- Checked that lazy choices are not evaluated too soon

Thanks Matthieu Agopian for the report.

Backport of 2f73b527dda6683868fac2791f7f07ccb01ea0d9 from master.