if there's a BOM, reduce the counter by one since we offset the buffer by one.
Authored by: steveking 2017-03-28
Parent: [r1303]
Child: [r1305]