Only generate licences if called directly

It was causing the coverage reporting to blow up.