There's nothing out of the box that will do this. You would need to
associate a feature Receiver with the Feature and then in the Deactivating
event code write a flag somewhere that you could check in the Activated
event code. Your biggest problem will be that Feature's don't have an
Activating event, only an Activated event. So you will probably have to
restructure your feature to create whatever needs to be created in the
Activated event, so you can check the flag before building or overwriting
something.