Fix for https://github.com/playframework/playframework/pull/2166/files#r9113098