Fix for crash in 3d table data tracing caused by off-by-one error