How to reset Logitech mouse's back/forward buttons?
As I mentioned in the comments, I found no other solution except changing the buttons to send the corresponding keystrokes. Fortunately, this works fine in almost every app I frequently use, including Finder.

The keystrokes I used were command+option+8 for back and command+option+9 for forward. Note that this is on a Finnish keyboard layout.