Ignore empty hash links when the current location ends in an empty hash - Fix #407