Media Library Stopped Working in WordPress 3.5.1
Seems like I am not alone in having this problem where images from the media library could not be inserted into posts since the images vanished.
As usual there were lots of tips and advice on the WordPress forums about disabling plugins and what not, even the thread being closed having "solved" the problem, and re-opened, but all of it was useless information. Some people rolled back their WP version to an earlier one.
The fix for me was to freshly install WordPress in my test environment.