At the end of the installation (after installfinalize) I run a new msi package. I thought that could be causing the problem. But the fact is that this package gets installed without problems (or so it seems).
I have gotten an installation log, but there is no extra info there.
I have run out of ideas, so if you can come up with something, please let me know.