Fixes race condition in resources

See #1378.
I remember noticing the same thing when I was writing this originally. Looks like it's only ever used meaningfully in getFloatingResources, which means that's probably broken and we haven't noticed because we aren't using it. Making a separate issue.