Based on 1.11.2 decompiled using MCP 9.35 rc1
The bug
Shift clicking an item stack with a count greater than 1 and slots which allow this item but have stacking restrictions can result in multiple slots being filled.
Code analysis
Based on 1.11.2 decompiled using MCP 9.35 rc1
The method net.minecraft.inventory.Container.mergeItemStack(ItemStack, int, int, boolean)
does not stop distributing the items of an item stack once it successfully placed some of them in a slot.
Sounds intended to me - you are shift-clicking away the stack, not shift-clicking items into one slot. Comparable to shift-clicking a stack of 27 cobblestone from your hotbar in to the inventory with 27 stacks of 63 cobblestone.