Fix delayed task sometimes not being re-executed.