Add: various minor improvements and fixings for "var" and "invar" support.