Non-standard dropped item layer bug

Fixes #4324
Also fixes another similar bug.

Details in commits.