Fixed the no initial BOM case

The code was ignoring the first BOM it found, not the BOM as the first character.