ikev1: Minor code optimization in task manager