Another name resolution bugfix for generate blocks