Fix FirstOrXXX access invalid memory address
Fix FirstOrXXX access invalid memory address

*DB is cloned, we should ALWAYS use the cloned pointer instead of original one.
aspcartman/gorm,sunfmin/gorm,arthurpro/gorm,d4l3k/gorm,arthurpro/gorm,ulule/gorm,ulule/gorm,ngorm/ngorm,sunfmin/gorm,jinzhu/gorm,ModelRocket/gorm,jaytaylor/gorm,ModelRocket/gorm,jaytaylor/gorm,seatgeek/gorm,lscieux/gorm,aspcartman/gorm,nkovacs/gorm,seatgeek/gorm,gernest/ngorm,jinzhu/gorm,nkovacs/gorm,lscieux/gorm,d4l3k/gorm