Fix for additional CV migration issues

One of the issues while migrating from 1.3 to 1.4 was that content view
delete in 1.3 was leaving bad data causing foreign key migration to
break. This has now been fixed with this commit.