Added in a check to State.createMetadata() which will throw an illegal argument exception if some kernel items to be closed over are not contained within the state. This is being throw because the current implementation adds the closed kernel items, when it should be adding in the set of kernel items to close over.