Modify the FindPrimary implementation so that it works correctly with a configuration

Change-Id: Ie41b688adf54de06332bbe5add7aba8107eb4264
Signed-off-by: Moiz Raja <moraja@cisco.com>
Merge "Modify the FindPrimary implementation so that it works correctly with a configuration"