Put everything in your inventory into a chest, and pick one type of object which you want to "copy". Then, select it into the first slot of your hotbar. Do the throw-things-away operation on the second slot of your hotbar(click and hold it and release afterwards). The thing you have in your inventory will be thrown out, while the count won't decrease. So you can get the thing you are holding out of nowhere. It only sometimes works if you only have got one type of thing in the first slot of your hotbar, so when you have more than 64 of it, it would not work anymore.
Cleaning up old issues, please reply if affecting 0.9.3