Undo function undo a lot more than the last element

Summary:
Sometimes while building custom houses the undo function undo a lot more than the last element.

Steps to reproduce:

  1. Start to build a custom house
  2. Put a lot of free cubes on it
  3. Sometimes the undo function undo a lot more than the last element.

Expected Results:
Only the last painted element is undone

Actual Results:
Sometimes the undo function undo a lot more than the last element.

Notes:
none

Attachments:
none

Version Number and Mods in use:
Alpha 19

System Information:
AMD 64 8Go RAM