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

Conflicts:
	kalite/securesync/devices/models.py