Fix bug in parsing of !# and add test.