#4198 avoid calling startTransaction before possibly return