First, Moth the link you sent is
1. recycled info the person got from others… and
2. some of it is outdated (dogs aren't really "den" creatures, nor are wolves who use dens only with young. Knowledgeable trainers know this but here is link: http://www.wolfcenter.org/den.html
Now considered sub-adults, the wolves will never use a den again in their life, unless one of them later becomes a mother herself. Dens are only used for birthing puppies, not as a sleeping area or to escape the weather as you may think. In captivity, wolves will occasionally use dens to escape dominance from other members, but this is not a natural behavior, rather an ingenious way to use the available environment to cope with the negative aspects of captivity.
3. some of it wrong (yes horses, cows and other grass eating creatures sometimes DO, indeed, guard food and grazing area)
4. dangerous. … to suggest a dog that growls over food is EVER, even under adult supervision, ready for a child to work with is bad info.
As for "space guarding" ...when your dog is actually reacting to being approached on a leash... having more to do with the leash/being held back and vulnerable and sometimes what we call "loading"... an excitement created by pulling on the leash, and in the home which is territorial. Being MOVED depends on whether the dog is asleep or simply having to do with saying you have no right to move it.
Second, the snarkiness at Sharon, uncalled for. She offered her advice that she does NOT allow other dogs to approach when leashed. That is pretty common behavior for many dogs, not just basenjis. Dogs reacting on leash is COMMON. To chastise her for giving you her view ... wow shaking head. Here's a bit of board education for you. You can post what you like, but others get to respond. And if you take a simple statement and jump them like you did her (someone I double darned guarantee you has more basenji experience than Moth or I have (albeit not more DOG experience, lol... sorry Sharon had to toss that in), you can expect snarkiness in response either from the person you jumped or someone like me who is less concerned with niceties than dear Sharon. Tut tut.
Third, your dog is MATURING. The "new" behavior may have nothing more to do with anything than maturing. Absolutely your dog COULD have a thyroid issue which can create aggressive behaviors but it is more common after 4 or 5 in most breeds. Maybe a breeder will chime in. Get a FULL panel, don't waste time on general one. Not sure where you send them in Australia but here we have maybe a dozen reliable sources only.
As for: she usually acts really excited
Many owners do not have the experience to interpret "excited." Excited often is "OH BOY A FRIEND" and often "OH BOY A CHANCE TO FIGHT" or "OH NO I CAN'T ESCAPE THE APPROACHING DOG."
Since you can avoid dogs, or stop them coming up to your dog... again, work on the human issues first, with vet check. You may have to accept that your dog, like many, is never going to regain friendliness to other dogs on lead. If you keep pushing it, it will, I promise you, get worse.
Take care of the human issues, and once resolved, then you can revisit the dog one. You might arrange a play date or find dogs your dog knows and likes and work on the leash thing with them later to retrain that dogs approaching on leash are not a threat.
They may "dig" to make den, but much like the circling, it's only a guess. Cara does this to Leora (my daughter) as if trying to dig under her. My daughter is not impressed and it is usually when she wants to play, not sleep. My bedding doesn't like it either.