replace.py: fix display_edit_counter_feature

Solution 1) as suggested in the bug description.
Avoiding scoping issues when replace is unloaded.

Bug: 72942
Change-Id: I27e5b003bb1c7ddbcafca192b366c4a710ef9144
Merge "replace.py: fix display_edit_counter_feature"