Use SEVERITY_MASK_IDX() to find the LOG_ERR index in the unit tests

Part of #30901 (moved), just needed a bug number.