HPNODAT - I see major positives in the experience you shared.
Going back and forth in decision making shows that your are aware that you have choices!! (How many times have I driven to purchase something (for me it would be a chocolate croissant!) and not had the inner dialogue and the outer struggle.) This is a huge deal. I don't think we can get to the place of making automatic (or more frequent) healthy choices w/o a struggle. Our brains don't seem to be wired to automatically shift gears in a short amount of time.
Also, you took the time to look at the ingredient list to help you make your choice and then you thought of a solution! This is cause for major celebration!
As for your daughter noticing your behavior, this could be an opportunity to help her grow. If parents share their thinking aloud, demonstrate the struggle and decision-making verbally, it helps children build strategies when facing struggles of their own.
All good stuff! And this time, you made a healthy decision.
As these stack up, your brain will eventually change.