Fixed 'No Such State - Undefined' error

Fixed this small bug.  All tests are passing.  I am not sure why, but it appears that the modified line wouldn't resolve properly when state.self (a state object) was equal to stateOrName.self (a state object) when it should have.