Resolve "Fix AI recalculation"

Closes #1749

See merge request main/Sumatra!1524

sumatra-commit: 7156ebe05eaab51cb1e7232f5619fd6ddb52dc9e
2 jobs for master in 7 minutes and 49 seconds (queued for 1 second)