Canceling the creation of a sprite animation, when sprites are dropped to the scene, throws an error

How to reproduce:
1. Open the attached project
2. Select multiple Sprites from Assets/Test_Visuals and drag them into the scene view
3. Cancel the popup
4. Look at the console
Result: "Failed to create animation for dragged object UnityEditor.DockArea:OnGUI()" and one of the sprites appears in hierarchy

Expected result: It should work the same as dropping sprites to the hierarchy and canceling popup: error is not thrown and none of the sprites stays.

Reproducible: 5.3.7p4, 5.4.4p2, 5.5.1p4,
in 5.6.0b8 popup doesn't appear and one of the sprites adds as a material on the other object in the scene