Issue #3219506 by yas: Use KernelEvent::isMainRequest() instead of deprecated KernelEvent::isMasterRequest()