Implement MatchWithRenaming and add simple test case