How this does not classify as "breaking" I do not understand... This will pretty much break everyone's market and resource balancing code and on top of that potentially obsolete everyone's hard worked remote harvesting system. There is still so much for me to work on, I do not appreciate having to fully revisit something I have nailed fairly well.
I enjoy seeing as many screeps moving about as possible, I rather see less teleporting, not more. Teleporting removes geostrategic gameplay and removes logistics which is otherwise super important in warfare.
Just disable the terminal entirely when hostile creeps are in the room (or similar to 'safe mode' create a 'siege mode') and force logistics on the defender side to try and supply the room.. with haulers. Very common with sieges throughout history.
No repairs with hostile creeps in room could work also forcing the defender to leave the ramparts and try clear the room.