Turns out that EF migrations was to blame. If I try to create the database schema from scratch, everything is fine, but if you create a migration to add these entities, EF fails by trying to create the index and foreign key twice, like this:
CreateTable(
"dbo.FundsAccount",
c => new
{
Id = c.Int(nullable: false),
Discriminator = c.String(nullable: false, maxLength: 128),
})
.PrimaryKey(t => t.Id)
.ForeignKey("dbo.Company", t => t.Id)
.ForeignKey("dbo.Company", t => t.Id) // duplicate
.Index(t => t.Id)
.Index(t => t.Id); // duplicate
The solution is to edit the migration, removing the duplicated FK and index entries.
I'll also update the question's title to better describe the problem.