Fix memory leak by removing also deploymentsByPath reference