Make dimensions query more robust for imported pages.