Arrangement: make tokens aware of their type (author=Roman.Shein)
(cherry picked from commit a41a8dcde5a06)