Why does a zip file contain hidden documents in 'view as student' mode?

If I download a zip file of a unit content in 'view as student' mode, it also contains the hidden and deferred publication documents. This causes unrest among teachers who test this, while in reality the student does not receive those files in the zip file. Why is it possible to download those files in student view mode?