The Mesh spec expects us to fall back to master credentials if friendship ones are not available. Also remove an unnecessary branch with the help of a new 'idx' variable. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>