Place the Smoker or Blast Furnace and Hopper.
Make furnaces to have some items.
Use command to change your gamemode.
Open the furnace.
Close the GUI and see your inventory.
Change the gamemode and move items to other slots.
Repeat 3-6
Now, you can have many items.
I think furnace uses inventory's 3 slots as furnace's slots. So it can make other bugs like MC-138669 or MC-140518.
If this continues to happen after these blocks are fully implemented, please comment