LCM: Replaced declare_element with declare_entity in creation of
interface element. Fixed computation of highest id to assign to new
surface element.