fixed the bug of --flatten option to emit invalid VCD