Only run greedy action selection if needed.
Merged in master.