Small bug fix in ApplyLinToLog

More work in the test than the bug :-)

simple array access error.