When placing item on top of fence (carpet, torch, blocks) the item is not removed from inventory. So you placed an item, and still have another one. You can duplicate blocks this way.
I can't report this bug under Realms because I can't select 0.15 as affected version in Realms project Jira. Affected Versions is correct now.
Linked issues
is duplicated by 6
1 more links
This happens when you place any item while aiming at the fence, not only on the top. Completely reproducible, allows reproduction of all items tested so far.