Fixed: :tablast was implemented as :tabfirst

Also added missing unit tests. This fixes #1172.