fix recursion problem on linux by more eagerly short-circuiting
seems like this is more right. Empirically, declaredType and _type are always the same.