Eraser tool draws instead of erasing
#### Steps to reproduce:
<!-- Describe what you did (step-by-step) so we can reproduce: -->
- open Inkscape
- Draw a rectangle with fill
- Use the eraser tool to erase part of the rectangle
#### What happened?
The eraser draws a red line instead of erasing anything. These new shapes get saved to the file and, interestingly, sometimes they're erasable, but not repeatably.
List of behaviours that may occur (taken from a [comment below](https://gitlab.com/inkscape/inkscape/-/issues/540#note_334894359):
1. Sometimes the eraser tool erases the path behind, and sometimes it doesn't
2. Sometimes it erases the path behind, but leaves its temporary path without deleting it
3. Sometimes it doesn't erase the path and it leaves the temporary path
4. Sometimes it creates multiple temporary paths + deletes or doesn't delete the path behind
5. Sometimes it just works normally, deletes the path behind without leaving temporary paths
6. If one does multiple quick erases at the same time, it freezes for a couple of seconds,
and then does one of the things above
Also easily replicable by using the eraser tool on a raster image.
#### What should have happened?
The eraser tool should have erased anything underneath what was being drawn.
#### Inkscape Version and Operating System:
- Inkscape Version: 1.0beta1 (e1bf8f584d, 2019-11-28)
- Operating System: Windows
- Operating System version: 10
From [launchpad issue 1425794](https://bugs.launchpad.net/inkscape/+bug/1425794), occurred as far back as 0.48

issue