In both creative and survival, when you are hit with a potion of invisibility while you are in a minecart you aren't invisible until you exit the minecart and alse when you are invisible and drink milk in a minecart, you arent visible until you leave.
Adjusted the title as the bug occurs on all riding entities.
Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. Unable to reproduce in 1.4.5.