Fixed some issues with button-container indexing

Added correct null/invalid assignment for button-container index.

Added validation for button destroying and index nulling.