Fix for possibility to include System module twice during creation of core distributive.
Fix for cookie domain detection during installation to website on custom port.