This is an issue for me as well. Was testing some scripting (also weird that we can't link a programming board to a dispenser, but w/e). Removed everything from the dispenser, all links, all contents. Invalid container when you try to remove the element.