Proper conditional compilation of RESTART_TASK