That was a bug! For some reason you could still take something from it without opening it, which was why my tests passed. It's fixed now.