I think we're saved mostly from really bad bugs by the strict instance equality check in ItemStack.isEmpty
, but nonetheless this should be fixed.
You can see this happening by inserting the following code below the public ItemStack constructors:
private void E() {
if (this.h && this == ItemStack.a) throw new AssertionError("TRAP"); // CraftBukkit
this.h = false;
this.h = this.isEmpty();
}
And then right clicking a block with a sword.
Only confirmed that the method still exists in this form and could cause problems, but not that it is currently actually called.