I found the answer: I remembered that Apache uses the first block if no other matching block is found, so I've added a block without a serveralias
at the top of the blocks:
NameVirtualHost *
<VirtualHost *>
DocumentRoot /defaultdir/
</VirtualHost>
<VirtualHost *>
ServerAdmin [email protected]
DocumentRoot /someOtherDir/
ServerAlias ip.of.the.server
</VirtualHost>
<VirtualHost *>
ServerAdmin [email protected]
DocumentRoot /someroot/
ServerAlias domain.com *.domain.com
</VirtualHost>