The bug
Drop an anvil on a bed. You can still sleep in the bed when you shouldn't be able to. This also works with other things such as pistons, blocks, enchantment tables, etc. As of 1.4.6, you are tossed aside with blocks atop beds, yet you are still allowed to sleep.
A solution for this could be to introduce an "obstructed" blockstate to beds, which applies when certain blocks are above it. Obstruction already happens with solid blocks. Logic like this could also be extended to chests and other blocks, causing them too to display hotbar text to guide new players.
Can you still sleep in the bed, when the anvil is dropped at the head section of the bed ?