also catch multiple trailing ampersands, thanks jussi for spotting this, refs #599