Fix for #1903: metadata check was wrong, outer loop should be model dependencies.

Conflicts:
	kalite/securesync/devices/models.py
Merge pull request #1909 from bcipolli/1903

Hotfix for #1903: metadata check was wrong, outer loop should be model dependencies