Correctly detect if a symbol uses a reserved section index or not.

The logic was incorrect for variables, causing them to end up in the wrong
section if the section had an index >= 0xff00.