The government took in more from tax receipts than expected, official data suggests.