Fixed.
I love it when I'm right. I ranted earlier today that the code changes I'd made shouldn't have anything to do with uploading images. I was right. They shouldn't. The bug was triggered precisely because they were connected when they shouldn't be. Some really old code in a JSP was trying to do something completely unnecessary, which caused the problem.
I deleted the unnecessary code, and all is well.
I'm still going to start building automated testing, though.