LCM: More strict rank checking for entities and other minor modifications.