fix(setLogicalName): Affect logical name only if not an empty string or null (fixes #5254)