prevent duplicate post state changes

Prevent duplicate state changes by checking if the current state is already the state we're trying to set and if so, don't change it and don't record it.

This makes sure that even though we don't record the new state and don't modify the object terms, we still return the appropriate log output.