Fix import detection in the Self test