Before I would say it's 100% territorial, you need to rule out any medical condition. The dog may also be having some sort of bladder infection. Especially if he just went outside and then does again when he comes in. If it continues, I would have the vet rule out any medical problem before jumping to other conclusions.

The breed is a beagle and he is neutered. While it's possible, I don't think it's likely that this is all just territorial issues. Dogs don't like to lay in their waste but perhaps he just can't hold it? If your cleaning it up all the time he has his favorite spot back to lay in and again has another accident. I'm just offering another side to look at. I've seen this before and after medical treatment the problem has gone away. I just don't like to label everything as a behavior problem when it may not be.

I hope you figure it out.