Makes sure that the share owner is set before entering the checks that need it. Partial backport of afa37d36