Improve checks of wfProfileIn-wfProfileOut.

Counting the profile names and verifying that they match.

Change-Id: I682a48c99d421bc6b7266f130ddd12f66f64af74