Bug in Kibana 5.4?

Just tried it.
If I define the scripted field like this:

if (!doc['duration'].empty) { 
    return doc['duration'].value/3600.0
}

when I zoom in, it fails completely. I get in Kibana a message like Courier Fetch: 2 of 236 shards failed.

Is it possible it is related to this https://discuss.elastic.co/t/no-result-when-filter-by-scripted-field/197575, also by me :slight_smile: ?