Fix case where including a system using a variable could generate an incorrect error
Merge branch 'master' into report-memory-improvements