Only perform expensive iteration though attribute names if passed-in map
didn't  already contain EVAL_SELECTION_TARGET_LOCAL_VARIABLE_NAME.
 Also removed unnecessary null checks.