Fix internal domain name generation (#6477)

Before, under certain circumstances, the internal domain names
were capped from i.e. 'dev.example.com' to 'dev.i'

Change-Id: Ibd4998a7ba128dcbce5ccb9d0a52006ed4431f01
https://leap.se/code/issues/6477#note-11

Change-Id: I3094be3ef60108f4f2cad5239b0b2f288b39620d
Merge branch '6477_fix_internal_domain_names' into develop
Merge remote-tracking branch 'leap/develop' into pixelated/develop