fix assignment update queries to only edit assignments with correct active code for the given instance (not latest not-inactive code)