The bar is still coming forward as you get closer to your knees because you're not straightening your knees out enough - you're opening up your hips too early. So you need to stay over the bar even longer. If that didn't work while you were thinking about it here, think "butt stays high and still" until you clear your knees. If this doesn't help, you may try thinking about pushing your butt back as you push the floor away, but that's kind of extreme.
What else will help is if you breathe and then set your back. You're setting your back, then breathing, then setting your back more. Just let your back stay rounded, breath, then set your back.