Only check for internal refs if refs are well-formed