Fix double inclusion of system_entities table