I don't think it's a chicken or egg problem. We still have the non-functional form of the gene for synthesizing vitamin C in our genomes. It's been identified, and the mutation which knocked out it's functionality is known. This was a single event. If the primate who had this variant didn't already have a diet high in vitamin C, it wouldn't have survived. And since their diet was high in vitamin C, they obviously had the sensory apparatus necessary for detecting the food sources