Don't rebuild order-only dependencies if main target is up to date.

This change slightly relaxes evaluation rules for order-only dependencies
to not rebuild them when main target is already up to date.