Fix scheduling bug when hosting entity is missing.

Change-Id: I7c961140b71199da47a0860f3c564d4e4e5a3da9