Generate correct code for delegate .ptr property.