Reordered code to get rid of warning, see
https://support.servoy.com/browse/SVY-6804?focusedCommentId=35365&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-35365