If compiling with base GCC, -fnested-functions needs to be passed.
PR: 235541 Submitted by: Piotr Kubaj