Modifications to source_chars array do not affect array used by loop. Attempted offset