allow nested link shares

allow to share a file/folder as public link also if one of the parents was already shared as link

fix for #3623 

cc @PVince81 @jancborchardt