The gnome (?) gives 10 XP if you find it and 0 when it gets revealed by the orb item. Is that on purpose or a bug? Because it's a random thing that really ruins a perfect score run.
It's not a bug, and if you clear the map, it won't cost you any points (trust me). The gnome's behaviour has been explained in previous comments, but you might enjoy trying to figure it out on your own...