Fixed #695: onGenerate() method in callback is not run for routes with a source
merging b220732eb503f77c64e6f3f54012bd6e28206aaa