Unwrap adapter if a ListView has headers

If a ListView has headers, IndexOutOfBoundsException might happen.