Issue #2596899 by bburg: Remove unnecessary DISTINCT from node access rebuild query to work around a MySQL bug