Check before outputting needs in model-test

Fixes #2755
Merge pull request #2829 from backspace/fix-model-test-blueprint

Check before outputting needs in model-test