Your code for this has room for improvement compared it creates an else statement that isn't needed as well as the steps should have just been a find and replace not a find and add above and then find it again and add below.
The proper code for this should be as follows
Find:
PHP Code:
$blocks[contactinfo]
Replace with:
PHP Code:
<if condition="$show[member]">
$blocks[contactinfo]
</if>