Prevent marker labels overlapping. Fixes #3535.