replace.py: fix display_edit_counter_feature
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
h4ck3rm1k3/pywikibot-core,darthbhyrava/pywikibot-local,wikimedia/pywikibot-core,hasteur/g13bot_tools_new,hasteur/g13bot_tools_new,magul/pywikibot-core,icyflame/batman,smalyshev/pywikibot-core,valhallasw/pywikibot-core,PersianWikipedia/pywikibot-core,Darkdadaah/pywikibot-core,magul/pywikibot-core,happy5214/pywikibot-core,VcamX/pywikibot-core,Darkdadaah/pywikibot-core,hasteur/g13bot_tools_new,npdoty/pywikibot,npdoty/pywikibot,emijrp/pywikibot-core,xZise/pywikibot-core,TridevGuha/pywikibot-core,jayvdb/pywikibot-core,happy5214/pywikibot-core,trishnaguha/pywikibot-core,h4ck3rm1k3/pywikibot-core,wikimedia/pywikibot-core,jayvdb/pywikibot-core