Fix dict.items() iterator issue in py3k