The spliterator added to HashMap will often (but not always) encounter a remaining element during a tryAdvance() call after forEachRemaining() has been called. (My guess is that the unpredictability is due to HashMap's random hashing seed).
See the attached test case. It's loosely based on the testMixedTryAdvanceForEach() test from SpliteratorTraversingAndSplittingTest.java. Running it a few times should eventually produce output similar to:
...
forEachRemaining: String158
forEachRemaining: String650
forEachRemaining: String29
forEachRemaining: String309
forEachRemaining: String715
Exception in thread "main" java.lang.Error: tryAdvance should have no elements: String51
at ObjSplitter.fail(ObjSplitter.java:35)
at ObjSplitter.lambda$3(ObjSplitter.java:31)
at ObjSplitter$$Lambda$4.accept(Unknown Source)
at java.util.HashMap$KeySpliterator.tryAdvance(HashMap.java:1528)
at ObjSplitter.main(ObjSplitter.java:31)