diff --git a/heist.cabal b/heist.cabal
--- a/heist.cabal
+++ b/heist.cabal
@@ -1,5 +1,5 @@
 name:           heist
-version:        0.14.1.1
+version:        0.14.1.2
 synopsis:       An Haskell template system supporting both HTML5 and XML.
 description:
     Heist is a powerful template system that supports both HTML5 and XML.
@@ -140,7 +140,7 @@
 
   build-depends:
     MonadCatchIO-transformers  >= 0.2.1   && < 0.4,
-    aeson                      >= 0.6     && < 0.9,
+    aeson                      >= 0.6     && < 0.12,
     attoparsec                 >= 0.10    && < 0.14,
     base                       >= 4.5     && < 5,
     blaze-builder              >= 0.2     && < 0.5,
@@ -161,7 +161,7 @@
     time                       >= 1.1     && < 1.6,
     transformers               >= 0.3     && < 0.5,
     unordered-containers       >= 0.1.4   && < 0.3,
-    vector                     >= 0.9     && < 0.11,
+    vector                     >= 0.9     && < 0.12,
     xmlhtml                    >= 0.2.3   && < 0.3
 
   if impl(ghc >= 6.12.0)
diff --git a/src/Heist/Common.hs b/src/Heist/Common.hs
--- a/src/Heist/Common.hs
+++ b/src/Heist/Common.hs
@@ -47,6 +47,15 @@
 runMapNoErrors = either (const mempty) id .
     runMapSyntax' (\_ new _ -> Just new) Map.lookup Map.insert
 
+applySpliceMap :: HeistState n
+                -> (HeistState n -> HashMap Text v)
+                -> MapSyntaxM Text v a
+                -> HashMap Text v
+applySpliceMap hs f =  (flip Map.union (f hs)) .
+    runMapNoErrors .
+    mapK (mappend pre)
+  where
+    pre = _splicePrefix hs
 
 ------------------------------------------------------------------------------
 -- | If Heist is running in fail fast mode, then this function will throw an
@@ -338,9 +347,7 @@
                      -> HeistState n           -- ^ start state
                      -> HeistState n
 bindAttributeSplices ss hs =
-    hs { _attrSpliceMap = Map.union (runMapNoErrors ss)
-                                    (_attrSpliceMap hs) }
-
+    hs { _attrSpliceMap = applySpliceMap hs _attrSpliceMap ss }
 
 ------------------------------------------------------------------------------
 -- | Mappends a doctype to the state.
diff --git a/src/Heist/Compiled/Internal.hs b/src/Heist/Compiled/Internal.hs
--- a/src/Heist/Compiled/Internal.hs
+++ b/src/Heist/Compiled/Internal.hs
@@ -526,8 +526,9 @@
            -> HeistState n     -- ^ source state
            -> HeistState n
 bindSplice n v ts =
-    ts { _compiledSpliceMap = H.insert n v (_compiledSpliceMap ts) }
-
+    ts { _compiledSpliceMap = H.insert n' v (_compiledSpliceMap ts) }
+  where
+    n' = _splicePrefix ts `mappend` n
 
 ------------------------------------------------------------------------------
 -- | Binds a list of compiled splices.  This function should not be exported.
@@ -535,8 +536,7 @@
             -> HeistState n        -- ^ source state
             -> HeistState n
 bindSplices ss hs =
-    hs { _compiledSpliceMap = H.union (runMapNoErrors ss)
-                                      (_compiledSpliceMap hs) }
+    hs { _compiledSpliceMap = applySpliceMap hs _compiledSpliceMap ss }
 
 
 ------------------------------------------------------------------------------
diff --git a/src/Heist/Internal/Types/HeistState.hs b/src/Heist/Internal/Types/HeistState.hs
--- a/src/Heist/Internal/Types/HeistState.hs
+++ b/src/Heist/Internal/Types/HeistState.hs
@@ -500,12 +500,14 @@
 
 ------------------------------------------------------------------------------
 -- | Restores the HeistState.  This function is almost like putHS except it
--- preserves the current doctypes.  You should use this function instead of
--- @putHS@ to restore an old state.  This was needed because doctypes needs to
--- be in a "global scope" as opposed to the template call "local scope" of
--- state items such as recursionDepth, curContext, and spliceMap.
+-- preserves the current doctypes and splice errors.  You should use this
+-- function instead of @putHS@ to restore an old state.  This was needed
+-- because doctypes needs to be in a "global scope" as opposed to the template
+-- call "local scope" of state items such as recursionDepth, curContext, and
+-- spliceMap.
 restoreHS :: Monad m => HeistState n -> HeistT n m ()
-restoreHS old = modifyHS (\cur -> old { _doctypes = _doctypes cur })
+restoreHS old = modifyHS (\cur -> old { _doctypes = _doctypes cur
+                                      , _spliceErrors = _spliceErrors cur })
 {-# INLINE restoreHS #-}
 
 
diff --git a/src/Heist/Interpreted/Internal.hs b/src/Heist/Interpreted/Internal.hs
--- a/src/Heist/Interpreted/Internal.hs
+++ b/src/Heist/Interpreted/Internal.hs
@@ -47,7 +47,7 @@
             -> HeistState n       -- ^ start state
             -> HeistState n
 bindSplices ss hs =
-    hs { _spliceMap = Map.union (runMapNoErrors ss) (_spliceMap hs) }
+    hs { _spliceMap = applySpliceMap hs _spliceMap ss }
 
 
 ------------------------------------------------------------------------------
diff --git a/test/heist-testsuite.cabal b/test/heist-testsuite.cabal
--- a/test/heist-testsuite.cabal
+++ b/test/heist-testsuite.cabal
@@ -14,7 +14,7 @@
     test-framework             >= 0.4      && < 0.9,
     test-framework-hunit       >= 0.2.7    && < 0.4,
     test-framework-quickcheck2 >= 0.2.12.1 && < 0.4,
-    aeson                      >= 0.6      && < 0.9,
+    aeson                      >= 0.6      && < 0.12,
     attoparsec                 >= 0.10     && < 0.14,
     base                       >= 4.5      && < 5,
     blaze-builder              >= 0.2      && < 0.5,
@@ -28,7 +28,7 @@
     errors                     >= 1.4      && < 1.5,
     filepath                   >= 1.3      && < 1.5,
     hashable                   >= 1.1      && < 1.3,
-    lens                       >= 4.3      && < 4.12,
+    lens                       >= 4.3      && < 4.14,
     mtl                        >= 2.0      && < 2.3,
     process                    >= 1.1      && < 1.3,
     random                     >= 1.0.1.0  && < 1.2,
@@ -36,7 +36,7 @@
     time                       >= 1.1      && < 1.6,
     transformers               >= 0.2      && < 0.5,
     unordered-containers       >= 0.1.4    && < 0.3,
-    vector                     >= 0.9      && < 0.11,
+    vector                     >= 0.9      && < 0.12,
     xmlhtml                    >= 0.2.3    && < 0.3
 
 
@@ -56,7 +56,7 @@
 
     -- Copied from regular dependencies:
 
-    aeson                      >= 0.6     && < 0.9,
+    aeson                      >= 0.6     && < 0.12,
     attoparsec                 >= 0.10    && < 0.14,
     base                       >= 4.5     && < 5,
     blaze-builder              >= 0.2     && < 0.5,
@@ -79,7 +79,7 @@
     time                       >= 1.1     && < 1.6,
     transformers               >= 0.2     && < 0.5,
     unordered-containers       >= 0.1.4   && < 0.3,
-    vector                     >= 0.9     && < 0.11,
+    vector                     >= 0.9     && < 0.12,
     xmlhtml                    >= 0.2.3   && < 0.3
 
   ghc-options: -O2 -Wall -fwarn-tabs -funbox-strict-fields -threaded
diff --git a/test/suite/Heist/Compiled/Tests.hs b/test/suite/Heist/Compiled/Tests.hs
--- a/test/suite/Heist/Compiled/Tests.hs
+++ b/test/suite/Heist/Compiled/Tests.hs
@@ -35,6 +35,8 @@
         , testCase     "compiled/namespace3"    namespaceTest3
         , testCase     "compiled/namespace4"    namespaceTest4
         , testCase     "compiled/namespace5"    namespaceTest5
+        , testCase     "compiled/nsbind"        nsBindTest
+        , testCase     "compiled/nsbinderr"     nsBindErrorTest
         ]
 
 simpleCompiledTest :: IO ()
@@ -131,3 +133,45 @@
     H.assertEqual "namespace test" (Left ["templates/namespaces.tpl: No splice bound for h:foo"]) res
 
 
+nsBindTemplateHC :: HeistConfig IO
+nsBindTemplateHC = HeistConfig sc "h" False
+  where
+    sc = mempty & scLoadTimeSplices .~ defaultLoadTimeSplices
+                & scCompiledSplices .~ nsBindTestSplices
+                & scTemplateLocations .~ [loadTemplates "templates-nsbind"]
+
+nsBindTestSplices :: Splices (Splice IO)
+nsBindTestSplices = "main" ## do
+    tpl <- withSplices runChildren nsBindSubSplices (return ())
+    return $ yieldRuntime $ codeGen tpl
+
+nsBindSubSplices :: Splices (RuntimeSplice IO () -> Splice IO)
+nsBindSubSplices = mapV (pureSplice . textSplice) $
+    "sub" ## const "asdf"
+
+
+nsBindTest :: IO ()
+nsBindTest = do
+    res <- runEitherT $ do
+        hs <- initHeist $ nsBindTemplateHC
+        runner <- noteT ["Error rendering"] $ hoistMaybe $
+                    renderTemplate hs "nsbind"
+        b <- lift $ fst runner
+        return $ toByteString b
+
+    H.assertEqual "namespace bind test" (Right expected)  res
+  where
+    expected = "Alpha\n&#10;Beta\nasdf&#10;Gamma\n<sub></sub>&#10;&#10;"
+
+
+nsBindErrorTest :: IO ()
+nsBindErrorTest = do
+    res <- runEitherT $ do
+        hs <- initHeist $ nsBindTemplateHC
+                           & hcErrorNotBound .~ True
+        runner <- noteT ["Error rendering"] $ hoistMaybe $
+                    renderTemplate hs "nsbinderror"
+        b <- lift $ fst runner
+        return $ toByteString b
+
+    H.assertEqual "namespace bind error test" (Left ["templates-nsbind/nsbinderror.tpl: No splice bound for h:invalid"])  res
