[FABRIC-792] Fix missing profile handling regression. Add unit and integ...

...ration tests.