A major plot point of this episode turns out to be Bart's allergy to shrimp, however, he has been seen eating shrimp before.
When Homer is in the defective roller coaster car, the writing on the side of the coaster car is backwards in one frame, revealing the use of a mirror image.
An elementary school principal should have immediate knowledge of all of his students' life threatening allergens. This would be documented in their files. He would not have to break into the local hospital and steal this information.
Principal Skinner claimed that his peanut allergy is so severe that a single molecule could cause his throat to close up. If this is the case then he should've started having a reaction as soon as he and Bart entered the factory, rather than only after falling into the vat.