Preserve class name added by renderLine event handler

Issue #2564