More proper prevention of select-all race condition

Issue #2491