I have an idea, I am going to use the WIFIC variable in an exit task for the wifi near profile and see if that helps clear things up. I don't understand yet why it stays on, the wifi off command should be killing it and according to the Tasker website the toggle option of the wifi near context should only enable wifi on for a scan. I have also posted this issue at the official tasker google group so hopefully I hear something out of there.
Well the "WiFi On For Home" would turn WiFi On if "Home=1" and it detects my router. Normally this would be fine if I am approaching home as it would subsequently connect. In this case I was driving away.
Actually, the exact sequence of events would have been I drove away, it disconnected and WiFi Off kicked in to shut it down. Then at .5 miles I noticed the "WiFi On For Home" kicked in. But of course, "Connected?" could never activate (and therefor turn on "WiFi Off").
What I ended up doing was what you suggested... In the "WiFi for Home" I put a WiFi Off if WIFIC = 0. That way when either I am no longer near the WiFi or Cell, it will still shut down.
This is pretty much what I was doing for my previous method using Location. Basically, I could be near home, but not close enough to connect (i.e., Driving through the area).
EDIT: I am sure my neighbors (and family) would have thought me crazy had they been watching. I am outside in 35 degree weather, walking around with my phone trying to determine how far away from my house it could detect my WiFi reliably. lol