skip adding value to variable when prefix is already there, fix #2332