Fix FlattenShadowedCredentials