The fossil of a small reptile that inhabited Scotland during the age of dinosaurs 167 million years ago has scientists puzzled.