minor fix to properly throw error when token reference to ruleId does not exist