This is effectively copy-pasted code that used to live in the old CompMap class.  I can change it here, or we can make it another issue.