Fix a typing bug occurring when SELF was used in a Michelson origination
When type-checking the code literal of a smart contract originated from Michelson, we have to be cautious to use the self type of the contract being originated instead of the contract doing the origination.
For this reason, we cannot have
self_type as a parameter of the
inductive type for instructions but it needs to be an index.
However, SELF is forbidden inside lambdas in Michelson so we do not have to care about typing the SELF instruction in lambdas.