I found the problem. The yas_gallery function fails to take into consideration that there may be other attachment images other that the gallery or the featured image.
When the function is called, one of the attributes that is passed in is a list of post id’s that are included in the gallery. This is a complete list of what images are supposed to be included.
So, near the top of the script I added the following, before the “extract” statement:
if (!empty($atts['ids'])) {
$post__in = $atts['ids'];
}
Then, after the setting of $args, later in the function I added this:
if ($post__in != '') {
$args['post__in'] = explode(',', $post__in);
}
I also commented out the exclude and post_status lines in the original $args array as they are not needed.
This fixed the problem. You can find this function at line 33 of the plugin.
I have also changed the version number of my copy to 100 to prevent it from getting updated. It seems it has been a while since anything was done with this, so maybe it will not be updated. But, hopefully if it is this information will be included.