This could be fixed by updating the list in edebug-read-function of characters that might possibly follow # to keep up with the changes to read1 since the last time that list was updated (in 2001). But I think it's better to remove the test entirely. If there is an invalid character then read1 will report a syntax error.