Fix case where including a system using a variable could generate an incorrect error