Detect and mark ghost container.

Fixes #361