The bug
Sneak-clicking on doors seems to bypass "can this item be placed on the clicked block" checks. When the door opens, the lever (or other such item) pops off.
How to reproduce
Load a world in 18w48a
Get a lever (or other item that can be placed on walls) and place any type of door
Sneak-right click the lever on the front face of the door
(Optional) Open the door to pop the lever off
Linked issues
is duplicated by 27
22 more links
Confirmed in 19w06a and 19w07a.