Fixing race condition during instance deletion.

Defer to the superclass to check if the instance is building
which handles more edge cases. This will prevent the instance
from being deleted while it is still being built.

Change-Id: I35b71931c7eec0ab7dfcec46f2ed4500f8803281
Fixes: bug #1101380
Merge "Fixing race condition during instance deletion."