Fix bug where "self" was being used locally and resetting global

refs #1972