better error reporting in LMVar