Fix reference resolution for formal arguments (type is optional)