Fixed some serious module deletion bugs that only manifest when using the offline mode of DeVIDE.
Fixed some serious module deletion bugs that only manifest when using the
offline mode of DeVIDE.

ivoflipse/devide,nagyistoce/devide,zhangfangyan/devide,zhangfangyan/devide,chrisidefix/devide,ivoflipse/devide,chrisidefix/devide,nagyistoce/devide,fvpolpeta/devide,fvpolpeta/devide