Add assertion to detect internal failure in early stage