Fix asset superseding and catch duplicate error earlier

Fix #1593