FIX: Due to an Hibernate bug, we need to add DISTINCT to queries with
JOIN FETCH.