Part of my code automatically replaces ramparts when they are destroyed. Normally a hostile walking onto a construction site will destroy it but if you create a construction site on top of a hostile creep then it's still possible to build it. (This has been the case for a long time.)
What's new to me is that when I build a rampart on top of an invader, a mass ranged attack from a creep on an adjacent tile isn't damaging the invader and the rampart the invader is standing on isn't destroyed. I don't remember seeing this happening before so something seems to have changed.
Here's a replay link of it happening on shard2: https://screeps.com/a/#!/history/shard2/E19N3?t=4001420