Fix for migrated/merged instances.
Speed up check_old_empty_platforms cleanup temporarily.
Merge branch 'refs/heads/master' into 2.3.x-dev