Fix a part of the instance elaboration, still many bugs.