fix conditional in find_section_by_index()

Signed-off-by: Seth Jennings <sjenning@redhat.com>