Fix bug in container isShared.