In a game that lacked many clear-cut chances, the big talking points will revolve around two key decisions – and Gillingham will feel aggrieved with both.
O'Toole was involved in off-the-ball shoving matches with a number of the visiting players and the defender should count himself very lucky for avoiding punishment after hauling Masterson to the ground in a headlock inside the box.
Referee Sam Purkiss appeared not to see the incident and the officials' view was also obstructed for the game's only goal.
Tilley's wicked in-swinging corner dropped over the head of Max Ehmer with Stevens running in behind, and the ball appeared to go in off the striker's right arm as he attempted to turn his body to meet it with his chest.
Gillingham were much improved after the goal and pressed high to force Dons defender Ryan Johnson into a couple of mistakes, with goalkeeper Owen Goodman quick out of the area to make a game-saving tackle on clean-through substitute Aaron Rowe.
But Johnnie Jackson's side saw the game out and will begin 2025 in the top two as they look to return to League One after three seasons in the fourth tier.