   metaPtr <- liftIO $ cValueMetadata vp
   tt <- translateType finalState typePtr
 
-  mds <- mapM translateMetadata metaPtr
+  mds <- mapM (translateMetadata finalState) metaPtr
 
   uid <- nextId
 

                          | InvalidIndirectBranchOperands
                          | KnotTyingFailure ValueTag
                          | TypeKnotTyingFailure TypeTag
                          | InvalidSelectArgs !Int
                          | InvalidExtractElementInst !Int
                          | InvalidInsertElementInst !Int

                           , metaIdSrc :: IORef Int
                           , result :: Maybe Module
                           , visitedTypes :: Set IntPtr
                           , visitedMetadata :: Set IntPtr
                           , localId :: Int
                           , constantTranslationDepth :: Int
                           , stringCache :: Map ByteString ByteString
