Fix document resize in various configurations:

* Document has no category
* Document is uploaded with catgeory “__all”
* Document is uploaded with catgeory “__without”
* Document is created with detail widget while an existing category is selected