Fix crash in migration code
Fix crash in migration code

Signed-off-by: Stéphane Graber <089afc6d81f66f1168a9849e15660feae286e024@ubuntu.com>

hallyn/lxd,lxc/lxd,stgraber/lxd,mjeanson/lxd,stgraber/lxd,ollie314/lxd,stgraber/lxd,georghopp/lxd,stgraber/lxd,jsavikko/lxd,mjeanson/lxd,yura-pakhuchiy/lxd,jsavikko/lxd,techtonik/lxd,techtonik/lxd,dustinkirkland/lxd,chrisglass/lxd,jumpstarter-io/lxd,smoser/lxd,georghopp/lxd,Skarlso/lxd,erikmack/lxd,Skarlso/lxd,yura-pakhuchiy/lxd,hallyn/lxd,Malizor/lxd,mjeanson/lxd,smoser/lxd,yura-pakhuchiy/lxd,ericsnowcurrently/lxd,erikmack/lxd,jumpstarter-io/lxd,ericsnowcurrently/lxd,akshaykarle/lxd,erikmack/lxd,atxwebs/lxd,lxc/lxd,achanda/lxd,lxc/lxd,chrisglass/lxd,georghopp/lxd,pcdummy/lxd,ollie314/lxd,pcdummy/lxd,techtonik/lxd,beni55/lxd,lxc/lxd,lxc/lxd,akshaykarle/lxd,atxwebs/lxd,lxc/lxd,ollie314/lxd,chrisglass/lxd,achanda/lxd,hallyn/lxd,jsavikko/lxd,hallyn/lxd,hallyn/lxd,ericsnowcurrently/lxd,hallyn/lxd,beni55/lxd,Skarlso/lxd,akshaykarle/lxd,stgraber/lxd,dustinkirkland/lxd,Malizor/lxd,pcdummy/lxd,lxc/lxd,atxwebs/lxd,Malizor/lxd,atxwebs/lxd,achanda/lxd,smoser/lxd,Skarlso/lxd,stgraber/lxd,stgraber/lxd,jumpstarter-io/lxd,dustinkirkland/lxd,beni55/lxd