Minecraft wiki entry for Anvil, associated text: If an anvil falls onto a block with a solid top surface, but the same block it is in cannot be replaced (torch, slab, etc.), it breaks and drops as an item.