diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown
--- a/CHANGELOG.markdown
+++ b/CHANGELOG.markdown
@@ -1,3 +1,7 @@
+4.0.3
+-----
+* Fixed random segfaulting when using `foldMapBy`.
+
 4.0.2
 -----
 * Properly bundled the modules needed for the properties test suite into the tarball for hackage.
diff --git a/lens.cabal b/lens.cabal
--- a/lens.cabal
+++ b/lens.cabal
@@ -1,6 +1,6 @@
 name:          lens
 category:      Data, Lenses, Generics
-version:       4.0.2
+version:       4.0.3
 license:       BSD3
 cabal-version: >= 1.8
 license-file:  LICENSE
diff --git a/src/Control/Lens/At.hs b/src/Control/Lens/At.hs
--- a/src/Control/Lens/At.hs
+++ b/src/Control/Lens/At.hs
@@ -181,6 +181,11 @@
 ixAt i = at i . traverse
 {-# INLINE ixAt #-}
 
+type instance IxValue (e -> a) = a
+instance Eq e => Ixed (e -> a) where
+  ix e p f = p (f e) <&> \a e' -> if e == e' then a else f e'
+  {-# INLINE ix #-}
+
 type instance IxValue (Maybe a) = a
 instance Ixed (Maybe a) where
   ix () f (Just a) = Just <$> f a
diff --git a/src/Control/Lens/Internal/Fold.hs b/src/Control/Lens/Internal/Fold.hs
--- a/src/Control/Lens/Internal/Fold.hs
+++ b/src/Control/Lens/Internal/Fold.hs
@@ -223,7 +223,7 @@
 reflectResult :: Reifies s a => (a -> f s) -> f s
 reflectResult f = let r = f (reflect r) in r
 
-data M a s = M a
+newtype M a s = M a
 
 unM :: M a s -> proxy s -> a
 unM (M a) _ = a
diff --git a/src/Data/ByteString/Lazy/Lens.hs b/src/Data/ByteString/Lazy/Lens.hs
--- a/src/Data/ByteString/Lazy/Lens.hs
+++ b/src/Data/ByteString/Lazy/Lens.hs
@@ -67,6 +67,9 @@
 --
 -- >>> anyOf bytes (== 0x80) (Char8.pack "hello")
 -- False
+--
+-- Note that when just using this as a 'Setter', @'setting' 'Data.ByteString.Lazy.map'@
+-- can be more efficient.
 bytes :: IndexedTraversal' Int64 ByteString Word8
 bytes = traversedLazy
 {-# INLINE bytes #-}
diff --git a/src/Data/ByteString/Strict/Lens.hs b/src/Data/ByteString/Strict/Lens.hs
--- a/src/Data/ByteString/Strict/Lens.hs
+++ b/src/Data/ByteString/Strict/Lens.hs
@@ -66,6 +66,9 @@
 --
 -- >>> anyOf bytes (== 0x80) (Char8.pack "hello")
 -- False
+--
+-- Note that when just using this as a 'Setter', @'setting' 'Data.ByteString.map'@
+-- can be more efficient.
 bytes :: IndexedTraversal' Int ByteString Word8
 bytes = traversedStrictTree 0
 {-# INLINE bytes #-}
diff --git a/src/Data/Text/Lazy/Lens.hs b/src/Data/Text/Lazy/Lens.hs
--- a/src/Data/Text/Lazy/Lens.hs
+++ b/src/Data/Text/Lazy/Lens.hs
@@ -87,6 +87,9 @@
 -- @
 -- 'text' ≡ 'each'
 -- @
+--
+-- Note that when just using this as a 'Setter', @'setting' 'Data.Text.Lazy.map'@
+-- can be more efficient.
 text :: IndexedTraversal' Int Text Char
 text = unpacked . traversed
 {-# INLINE text #-}
diff --git a/src/Data/Text/Strict/Lens.hs b/src/Data/Text/Strict/Lens.hs
--- a/src/Data/Text/Strict/Lens.hs
+++ b/src/Data/Text/Strict/Lens.hs
@@ -86,6 +86,9 @@
 -- 'text' ≡ 'unpacked' . 'traversed'
 -- 'text' ≡ 'each'
 -- @
+--
+-- Note that when just using this as a 'Setter', @'setting' 'Data.Text.map'@ can
+-- be more efficient.
 text :: IndexedTraversal' Int Text Char
 text = unpacked . traversed
 {-# INLINE text #-}
