Refine the test for Ticket #2451 to check for aliases as well