Another fix around the select-all hack

Issue #2495