title: Unexpected behavior of filter inside a function dplyr
body: <p>I have a function that filters a <code>data.frame</code> based on the unique values of a group column that is passed to the function</p>
  <pre><code>la &lt;- function(df, grp){
    gr &lt;- df %&gt;% pull({{grp}}) %&gt;% unique()
    purrr::map(gr, function(x){
      print(x)
      filter(df, {{grp}} == x)
    })
  }
  </code></pre>
  <p>When I use it with this df,</p>
  <pre><code>x &lt;- structure(list(mac = c(&quot;dc:a6:32:21:59:2b&quot;, &quot;dc:a6:32:2d:8c:ca&quot;, 
  &quot;dc:a6:32:2d:b8:62&quot;, &quot;dc:a6:32:2d:ca:3f&quot;), datetime = structure(c(1594644546, 
  1594645457, 1594645375, 1594645080), tzone = &quot;UTC&quot;, class = c(&quot;POSIXct&quot;, 
  &quot;POSIXt&quot;)), Comment = c(&quot;FED2&quot;, &quot;FED7&quot;, &quot;FED1&quot;, &quot;FED6&quot;)), class = c(&quot;tbl_df&quot;, 
  &quot;tbl&quot;, &quot;data.frame&quot;), row.names = c(NA, -4L))
  </code></pre>
  <pre><code>la(x, mac)
  </code></pre>
  <p>I get the proper prints and the subsets.
  However, when I use it with this other df, which should be equivalent, it doesn't work as expected.</p>
  <pre><code>df &lt;- structure(list(datetime = structure(c(1594644600, 1594644900, 
  1594645200, 1594645500, 1594645800, 1594646100), class = c(&quot;POSIXct&quot;, 
  &quot;POSIXt&quot;), tzone = &quot;UTC&quot;), movement = c(9940.50454596681, 10779.7747307276, 
  7148.52826988968, 7687.54314683339, 8797.06954533588, 7524.02474093548
  ), x = c(606, NA, 240, NA, 504, NA), y = c(386, NA, 274, NA, 
  56, NA), i_x = c(606, 228, 214, 407.5, 500, 292.947368421053), 
      i_y = c(386, 286, 258, 49.1666666666667, 56, 234), mac = c(&quot;dc:a6:32:21:59:2b&quot;, 
      &quot;dc:a6:32:21:59:2b&quot;, &quot;dc:a6:32:21:59:2b&quot;, &quot;dc:a6:32:21:59:2b&quot;, 
      &quot;dc:a6:32:21:59:2b&quot;, &quot;dc:a6:32:21:59:2b&quot;)), spec = structure(list(
      cols = list(filename = structure(list(), class = c(&quot;collector_character&quot;, 
      &quot;collector&quot;)), datetime = structure(list(format = &quot;&quot;), class = c(&quot;collector_datetime&quot;, 
      &quot;collector&quot;)), movement = structure(list(), class = c(&quot;collector_double&quot;, 
      &quot;collector&quot;)), x = structure(list(), class = c(&quot;collector_double&quot;, 
      &quot;collector&quot;)), y = structure(list(), class = c(&quot;collector_double&quot;, 
      &quot;collector&quot;)), i_x = structure(list(), class = c(&quot;collector_double&quot;, 
      &quot;collector&quot;)), i_y = structure(list(), class = c(&quot;collector_double&quot;, 
      &quot;collector&quot;))), default = structure(list(), class = c(&quot;collector_guess&quot;, 
      &quot;collector&quot;)), delim = &quot;\t&quot;), class = &quot;col_spec&quot;), row.names = c(NA, 
  -6L), class = c(&quot;tbl_df&quot;, &quot;tbl&quot;, &quot;data.frame&quot;))
  </code></pre>
  <p>I get 0 rows on each type of group (my real example has the same groups as the ones for the <code>x</code> dataframe).
  Interestingly, this works as expected.</p>
  <pre><code>la(select(head(df), mac, datetime), mac)
  [1] &quot;dc:a6:32:21:59:2b&quot;
  [[1]]
  # A tibble: 6 x 2
    mac               datetime           
    &lt;chr&gt;             &lt;dttm&gt;             
  1 dc:a6:32:21:59:2b 2020-07-13 12:50:00
  2 dc:a6:32:21:59:2b 2020-07-13 12:55:00
  3 dc:a6:32:21:59:2b 2020-07-13 13:00:00
  4 dc:a6:32:21:59:2b 2020-07-13 13:05:00
  5 dc:a6:32:21:59:2b 2020-07-13 13:10:00
  6 dc:a6:32:21:59:2b 2020-07-13 13:15:00
  </code></pre>
  <p>What is going on?</p>