attachment.php & flexslider—linking thumbnail to specific image

The answer was to assign a count to each attachment:

$args = array(
    'post_type' => 'attachment',
    'numberposts' => -1,
    'post_status' => null,
    'post_parent' => $post->ID,
    'order_by' => 'menu_order',
    'order' => 'DESC'
);

$attachments = get_posts( $args );
    if ( $attachments ) {
    $count = 0;
        foreach ($attachments as $attachment) {
            $link = get_permalink($attachment->ID);
            $link = add_query_arg('img',$count,$link);
                echo '<div class="thumbnail">';
                echo '<a href="'.$link.'" >';
                echo wp_get_attachment_image( $attachment->ID, 'small' );
                echo '</a>';
                echo '</div>';
                $count++;
        }
    }

And then link up with that on attachment page using the assigned number.