Hypoellipticity for a class of operators with multiple characteristics