Doesn't placing beginTransaction below the if-clause exclude "single requests" from using transactions?