Fix issue where variable is used before it is declared
Merge pull request #3084 from mkoistinen/fix_cms_check

Fix issue where variable is used before it is declared
Merge branch 'develop' of github.com:divio/django-cms into develop