Fix handling of disabled products when restoring.

If build data already exists (i.e. the product was not disabled before),
we must not swap it over to the new product, and we need to remove all
the artifacts from the build graph.

Change-Id: I210f8da72a7252905a6c92f3db6b2a907922f7b0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>