Fixed check for excluded packages