Fix scaling of custom markers

See also #3441.