I am afraid the symptom is back.
When one first clicks on "Posts", a request to loadingAnimation.gif is made successfully. Then when "Edit" is clicked (in quick menu under posts title) another request is made, again successfully. Then, (assuming, the post has a gallery) When "Edit Gallery" icon is clicked, a series of requests are made. One of these is to http://domain/wp-admin/wp-includes/js/thickbox/loadingAnimation.gif (notice the wrong path, there is an extra wp-admin) which fails with 404.
This is definitely a bug in wp-includes/js/thickbox/thickbox.js in the way the relative URL is used, because if one changes the line 9
var tb_pathToImage = "../wp-includes/js/thickbox/loadingAnimation.gif";
var tb_pathToImage = "../wp-includes/js/thickbox/dummy.gif";
Then that last failing request changes to http://domain/wp-admin/wp-includes/js/thickbox/dummy.gif (again notice the request URL), but of course so as the first two originally successful requests since then no such gif exists.
When in post edit mode ../ is falling into root directory and the call to ../wp-includes/js/thickbox/dummy.gif is successful. When gallery popup is displayed however ../ is insufficient and we are falling into wp-admin, hence the request to wrong URL http://domain/wp-admin/wp-includes/js/thickbox/loadingAnimation.gif
Finally, changing the line 9 to
var tb_pathToImage = "../../wp-includes/js/thickbox/loadingAnimation.gif";
resolves the problem, as well as other requests not breaking, though I don't understand how or why and I am not sure if this will have other side-effects.