Chests can spawn where lava is, but the chests are layered over it meaning you can take damage from the lava without actually seeing it. There was another time where a chest was entirely layered over lava, so it looked like I was taking damage from completely nothing and I almost died to it