Work around JBehave performance issue for invalid input - when the curly braces are unmatched.
Fixing shifted highlighting of parameters
Fixing some possible NPEs