I think you are exactly right. This patch was bothering me, as I knew it was working when tested, but when I stared at the code, I knew it just wasn't exactly correct. I'd parse it in my mind and see that it was missing something but I haven't had time to really slow down and think it through. I tested my patch and it ran so I submitted a pull req to at least keep the installer working. I checked my DB and it said migration 40 so I figured it worked, but it was nagging at me that it was not correct 100%. Your proposal IS correct 100%, and so I'll go check now and if you have not already submitted this patch, I'll do it right away.

Thanks @mwhitneysdsu ! The value of peer review continues to prove itself.

Cheers
Corky