You should just use `automaticallyEnabledExtensions.indexOf(..)` here, then no need for this function.