buffers: protect against bad thread indices