Double-counting visits – Page view + Events

Matomo is double-counting visits. The user visits the page, which fires a page view, counts as 1 visit, and then I fire a custom event, e.g. “Section view”, but it counts this custom event as another visit. However, it’s the same visitor, so should be only 1 visit.

I’m using JavaScript tracking code on a self-hosted version.