fixed a wrap-around bug in copy-to-lbuf

- when prod/prod_pvt wrap around, cons should not be 0. If so,
  prod/prod_pvt/cons are all zero, meaning lbuf is falsely considered to
  be empty, even if it's full.