Fix derivative when there is a group by time() and fill

Fix #334