Fix repeated query in category index for logged in users
Merge pull request #1921 from mahagr/master

Fix repeated query in category index for logged in users