Fixes an issue where local members are included in the mapping entry count. Also: avoid re-computing Mapping.length