I don't think the Russian authorities would bother with checking that you're not "transiting" to the same country that you've just arrived from. However, the airline might.
Anyway, RIX-LED-HEL-xxx seems like a perfectly legal (and reasonable) transit route.