Updated virtualization unit to prevent a task switch on occuring when the next task is the same as the current task