resolve_ref(): do not follow incorrectly-formatted symbolic refs