expand() function not handling string containing # character after upgrade to 17.2