Handle const modifier in getOccurrences

Fix for #1331. Const is not handled as a modifier, so add the handling for it.
Wait, actually, that's right; `const` is not even a modifier. Why were we ever running into this?