Skipping reference table for autojson in query parsing

The reference table for autojson tests is determined by the table name 'reference' solely. The query parser should do the same and not rely on the naming of "-1" for the task. This commit fixes the issue but it also introduces a close coupling between access/system and access/storage. If that's fine, merge, otherwise; I am open to suggestions.