Revised error handling for TOC labels.