The change from #984, which was a partial backport of #939, missed a `return` statement which in turn causes `NullPointerException`. See #1047.