Optimize use of YangInstanceIdentifier.getPathArguments()