Fixed #619: onGenerate() method in callback is not run for routes with a source
merging 5706774099ebf5170b2056f65e3fbd912205dea2