Update logic for validates_merge_request for tree of MR

### For case:

Merge request №1: branch "feature" to "release" and remove "feature" branch

Merge request №2: branch "release" to "master" and remove "release" branch

Merge request №1 - broken :(