Obstructions in a model category and Klein and Williams' intersection invariants