It seems that #7967 introduced an RPC test that fails for me around 30% of the time. I assume it's because of indeterminism in coin selection, and not an actual bug in the code.
This is a workaround. If anyone feels like coding up a better fix, feel free.