Yes, it's a check if you are in combat, then no building is happening.
I also thought about ditching that check, it's mainly a thing to make it more realistic, but it's also a bit annoying.
I experienced it, when killing worms in seablock and even if worms are dead, it stops working, when I accidentally step into a remaining spit pool.
I need to check, if it has other consequences, though.
A setting is probably the way to go.