Fix batch insert function to properly cache activity info when activity definition references the base class.