swap usage: Prevent endless loop when a task is passed as an argument.