fix bug in handling of inferred origin