Hi Red! I'm really really sorry about the lateness of this reply--but please be assured that I feel nothing but extremely flattered that you took the time to re-read and comment! :D
I think that the whole affair (which, in my mind, wasn't really from before, but was a new thing, poss. after he and Harry already got together, when he had the luxury of time) was really something--different, for Severus. Something novel, something nice, that he'd never had. And he treated it that way--not as something significant, not like a relationship, so it didn't seem to him to have any bearing on how he felt about Harry. He would have sacrificed anything for Harry. He was certain that his involvement with the shopkeeper was no threat to his relationship with Harry, in terms of his own feelings--and he felt fairly confident in his ability to keep it secret from Harry, too. I think, though, that when Harry came upon him the one time--he understood that, despite his own skill at secrecy, it was still too risky because while he can predict Harry's behavior to a relatively high degree of accuracy, he can never call it correctly 100% of the time. He knows Harry would be hurt if Harry found out--and he can't allow THAT to happen--so in the end, it's easy for him to give up his dalliance.
That's my own (current) take, though. :) I think everyone should be free to decide for themselves. Plus I might change my mind later. :)