After investigating, it seems I have been affected by a bug as described here: https://serverfault.com/questions/491464/directories-shown-as-files-when-sharing-a-mounted-cifs-drive
It seems there is a bug when "resharing" with samba: Directories are shown as files because of a bug. Samba uses the inode count to determine this and cifs sets this to zero. So all directories appear as files of size zero.
The proposed solution is to recompile a kernel module for samba, but I do not think that is a viable solution. It has been 3 years since the answer, maybe someone knows a better solution now. The original bug has been marked as WILL_NOT_FIX in cifs and in samba, nothing seems to have happened.
If anyone has a better solution, I would like to hear from them.