Fixed crash in wagtailcore 0005_initial_data migration