Wanted to share what caused the error in my case. Spend couple hours to figure this out, so hopefully it will help to save someone some time.
Strangely enough, the error was raised with the Enable drop directory quota
setting being enabled for the domain.
I am not the expert and don't know the technical explanation, but unticking the mentioned setting sorted the problem.