Fixed check for referenced cores. See #1157