Fix revision bug in contrib generation

Fixes processing/processing#2803.

Fix bug with revision limits. Tested locally.

/cc @REAS @alignedleft @prisonerjohn