experimental patch to simplify generated function detection