Fix asymptotic runtime of createClkDomain