VIM-528 and VIM-459

VIM 528 - 459 (duplicate of 528)
These 2 cases are fixed with this commit
Additionally, there are a couple of new test cases for search groups and substitutions.