That is a super clever self-test. As long as you remember your allergy, you have enough wherewithal to live the life you want. If you lose enough of your memories to forget that one, then you've preset your exit on your own terms, while you still could. It's probably also faster and less of a betrayal than being mauled by a bear.