Fix previous broken optimization.

Remove global register definitions that aren't valid anymore and fix
SREG being corrupted in case of nested interrupts.