Wrap mutate in subquery is window function used.
Closes #484