Good question! I've only ever done a cash upgrade at the airport for an outbound KL-coded/VS-operated flight, and my outbound ticket was actually re-issued with a VS-code in the new cabin class and therefore separated from the rest of my original KL-coded booking which still contained my return leg.
Looking at the Virgin Flying Club upgrade information
here, it states
"Please note, if your flight starts VS but operated by another airline you can't use your points to upgrade."
Similarly, on AF/KL Flying Blue's upgrade information
here, it states
"Upgrades are available on Air France and KLM flights and selected partner airlines" - admittedly it's a little less clear than Virgin's policy, but one would have to assume that upgrades are only possible with Flying Blue points if the flight is both AF/KL coded
and operated, and that Virgin Flying Club points can only be used to upgrade VS coded
and operated flights.
Happy to be proven wrong though!