see <https://github.com/micronaut-projects/micronaut-core/issues/2946>