Prepatcher now patches generics. Fix a case where the tickRegions list could break, fixes #506, #509, #510

Signed-off-by: Ross Allan <rallanpcl@gmail.com>