I actually just submitted this bug report a few days ago! I found that using Expr(Function()) inside a function causes a crash. I was using it in the context of
Substitute(my_expr, Expr(Function()), Expr(Method()))
But was able to get by using Expr(Function) instead.
For your issue, another possible solution if you don't want to parse strings is do something like this
y = Function({head_key},
ID = Associative Array( EvalList({{Name Expr(), 1}, {Expr(), 2}, EvalList({Head(Expr(Function({},1))), 3})}), 0 );
ID[NameExpr(head_key)]
);
Show(y(Expr(Function())));
Although still not exactly 'pretty.'