Fix setting TLS options

The parameter order used in `array_intersect_key` was causing the original settings to override the new settings, and no changes were applied.