Bugfix for regular expressions longer than the chain