Make typed layer flexible enough to handle ids of any wacky structure