Fix bug in unused variable tracking

Variable usage was not tracked correctly for known rowtypes.

Per report from Steeve Lennmark.