added bounds and type checking for constant pool references in expander