Scans of the fossilised skeleton of Megachirella revealed the chameleon-sized reptile was an ancestor of today's lizards and snakes.