At least show a warning message when a CA with PathLenght=0 try to issue another SubCA.
Otherwise , this situation will create a certificate non-compliant with RFC5280 Path Validation, section 6.1.4, because Path Validation will fail.
(l) If the certificate was not self-issued, verify that
max_path_length is greater than zero and decrement
max_path_length by 1.