So I have tried to recreate your scenario as follows with a simple script
Scenario seems to match exactly ... so tried again - and it works - and
i can't make it fail no matter what (sensible) i try :/ ... wth?
What could have changed:
* no configuration changes in eclipse - at all (related or otherwise).
* no configuration changes at server side or folders.
* created a new local project - did not attempt to debug or anything.
busy with other stuff, did hardly anything with it.
* i did restart my pc ... khm :/ ... quite sure i had not done that a
week or two.
* we did have some network problems, but not at the time nor every day.
* did not notice anything interesting in eclipse .log file.
=> no idea why it is working now. I'm assuming restart did its magic.