MOB-2297 Don't update categories without changes

This is quite important method which should be unit tested as well.