Fixed folder icon update routine when share owner exists

Whenever a folder has a "data-share-owner" attribute, the icon is now
properly updated to a shared folder icon.

Backport of 607ea636be4a5a48b6abec8df3eaefe20fe4a1ba from master