Addresses feedback from @palys-swm here: https://phabricator.ashoat.com/D3827?id=11833#inline-23376
Unfortunately couldn't name the argument queuedChanges because that's already defined in the scope and led to eslint warnings, so had to go with prevQueuedChanges which I'm not a huge fan of and imo makes things a bit less readable.