of-config: fix crashes with invalid resource-id