Avoid bad deinits

On the first pass, set_container_bmp will try to deinit stuff that hasn't been
init'd.  This causes blowups.  To avoid this, we set one of the members of the
bmps to NULL and then check it before we deinit it.