Add test helper to return nth matching element