Actually set the USE_TAB_CHAR pref when it needs to be set.

Fix for #6996. I would have written a test for this, but I wasn't sure how to simulate pressing the tab key. Regardless, this code gets exercised a fair bit and the fix is a straightforward one liner.

cc @njx