ensure preserve_backend_stack() preserves backend name

The backend name was incorrectly being modified outside of the with
clause when using preserve_backend_stack().
Merge pull request #99 from rjw57/fix-switch-backend

ensure preserve_backend_stack() preserves backend name