Fix a bunch of small issues.

This set of changes fixes 3 recent issues:

* #3997 - bake all related.
* #3999 - file upload parsing.
* #4007 - plugin bake.

I figured doing separate pull requests for each was a waste of everyone's time, so I hope this format is ok.