Fix a few issues with inflating and storing references
Fix a few issues with inflating and storing references

franciscodzuryk/sugar,vincekennedy/sugar,AdamLuptak/Time_MNA,gmarques33/sugar,brunogonncalves/sugar,weikipeng/sugar,loulousky/sugar,dangalg/sugar,offbye/sugar,satyan/sugar,mbag102/sugar,alfmatos/sugar,dnalves/sugar,albinpoignot/sugar,maarek/sugar,mitchyboy9/sugar,SemonCat/sugar,RossinesP/sugar,nayosx/sugar,diogosq/sugar,GeekHades/sugar,bigsui/sugar,janzoner/sugar