Fixes bugs in ArrayType, ConstantType and _cleanse_value