Optmized decodeRefinement, moving the prediction error outside the inner loop

There is no need to slow down the inner loop with a test for ltp as it can only
change if prediction is true in which case it only changes in the outer loop.