diff --git a/buildstream/sandbox/sandbox.py b/buildstream/sandbox/sandbox.py
index 76543593f10a19e4c9639b0d8ca78df93a296879..e741413146a718e32d0da4cf1de3fb2a638d83d1 100644
--- a/buildstream/sandbox/sandbox.py
+++ b/buildstream/sandbox/sandbox.py
@@ -147,7 +147,7 @@ class Sandbox():
     def set_virtual_directory(self, vdir):
         """ Sets virtual directory. Useful after remote execution
         has rewritten the working directory. """
-        self.__vdir = vdir
+        self._vdir = vdir
 
     def get_virtual_toplevel_directory(self):
         """Fetches the sandbox's toplevel directory