added Linkformat-value 'if' workaround to LinkValue.encode