Fix CAN message indexing in generated code when some are disabled.