Make infantry switch back to waiting/idling right after attacking

Fixes 2) of #5884.