"Which should be a salutary lesson to all software developers: if you're working on a personal project, check your employment contract and employee rights to ensure your work doesn't ultimately belong to your boss."
RTF... Contract.
Seriously. And the agreements you signed on the side. I actually contacted legal of the new employer before signing. Fortunately I'm mostly doing development on 1) code that is not interesting to most, there's maybe five people in the world using it 2) was largely developed in a previous job before I signed up with this company and 3) has always been licensed under the GPL. Legal agreed that they now know about this, and are ok with it, still got the email archived.
Any (completely) new (I guess commercially viable, I'm not running any old Lego Mindstorms program past them, when I finally buy one) project, even if I develop it in my spare time, would need to be run past the company, who could call dibbs on it and claim it as their property. Again, I signed up to this, knowing and accepting it, and they know that I do FOSS stuff, which they cannot claim as their own.