After getting a replacement phone, I backed up everything with the My Backup app. After restoring to the new phone I found that in the Gallery app Camera folder, older photos appeared first, not the most recent as is usual and expected. I found that the file modification date was changed to the current date so I found a utility called jhead. I mounted the SD card on my computer and then used the command "jhead -ft *.jpg". That command changed the file modification date to match the exif date on all the jpg files. After rebooting the phone I found it did not work.
So my question is: What criteria does the Gallery app use to sort the files? Hopefully once I find out I can fix the problem. Thanks for reading!