See also: https://grafana.com/blog/2018/04/26/grafana-v5.1-released/
It appears this was resolved by 78bd2b00759828d499f863884bf6f74a4962baf8 without mentioning this bug.
www-apps/grafana-bin-5.1.3 is in the tree, thanks to klausman!