There are many potential race conditions in this method (previosuly existing as well) caused by accessing workspace.CurrentSolution. The workspace is mutable and the current solution may change arbitrarily while this method is executing.
Originally posted by @tmat in #57073 (comment)
Applies to both providers.