Hi Andre,
I'm still unable to replicate the issue on my Moodle 2.6 instance. The difference in returned data between the first and second attempt with the same file name is expected, and all looks fine. The permission error that you were getting before you added the contains_private_data method makes me suspect that it's related to the way you've disabled private files. Can you please confirm whether you've simply followed the instructions in the docs, or if something further has been done to disable private files?