Move tick class to the g element. Fixes #1016.