In the original attachConfigurableProductChildrenAttributeMapping function, the array keys are normalized using Mage_ConfigurableSwatches_Helper_Data::normalizeKey (which uses mb_strtolower). In your version, the keys are normalized using a regular strtolower, which doesn't work with special characters.
For example, I have an attribute called "Érable" for which the swatch image won't show because it's looking for a key called "érable" but the actual key is "Érable" because it was not normalized properly.