How to set files public directory programmatically?
You can set that variable like so:

variable_set('file_public_path', 'sites/domain/files');


Hopefully someone else will be able to tell you why this problem is happening, I have no such issue in any of my multisite installations.