various bugs when building a numericitemdomain(and thus range)