compiler/libec: Fixed corruption in type parser (Closes #944)