Players leave teleport trails even if they are invisible

This issue affects

(Name of the command, the type of action performed, etc.) /spawn and all commands that make TP trails

How this differs from the expected behaviour

(What it should do) Even when teleport trails are enabled, invisible players should not leave teleport trails (or at least leave invisible ones).

How the issue manifests itself

(Steps to reproduce too, please!) Drink invisibility potion, /spawn.