I encountered a bit of a weird one today, which took some creative thinking to sort out, involving restoring a database into a SQL Server 2012 LocalDB. I am still not entirely sure what the root cause of the problem really is, but I'm sharing my solution just in case it proves useful to anybody else.