Allow serializing buffer with output-buffer being used Ie, don't call get_positions() if positions are not requested for serialization.