Fix #if directives for instantiation.