How do I set my computer to restart in the last operating system
The answer is it was never worked that way. If you want it to work that way, you have to install a boot manager.  The most common free one is call rEFInd. Most people install this software in the OS X partition, but this can lead to problems when you install updates. I installed rEFInd in its own partition to avoid such problems.

I would go with @ryebread's answer and just use either "Startup Disk" on OS X System Preferences or "Boot Camp" menu on Windows Control Panel. An example of this is shown below. Here, Windows is set as startup.



If I want to switch to OS X, then I need to click on the OS X icon to highlight it. This is shown below.



I am now set to boot to OS X. There is no need to do a Restart. I can just close the window. 

(Actually in practice, you will probably end up selecting the Restart button.)

Update 1:

If you want to boot from OS X to Windows while leaving OS X as the default, then you would need to enter the bless command from a Terminal application window. Or, you can create a script launched as a Service via the Automator application. An example script is given here.

Update 2:

After some testing, I found if no system is highlighted in the Startup Disk window, then the computer always boots to OS X. I am not sure what your computer was doing originally. I think what you want is for the computer to always boot to the last operating system  that ran. If this is true, then rEFInd is probably the best way to go. On my computer, rEFInd only occupies 6 MB of space. If you need help installing, let me know.

BTW, I removed the highlighting by blessing a flash drive.