Fix crash when using build macro on interfaces