Calling exif_tag_from_name("GPSVersionID") will always fail, as GPSVersionID has tag value 0, which - unfortunately - is also the "not found" error return indicator from exif_tag_from_name().
Easily reproduced with "exif --ifd=GPS --tag=GPSVersionID xyz.jpg"
You can actually see the GPSVersionID tag by specifying --tag=0 on the command line, but yes, this is a problem with exif_tag_from_name().