Sub-structure search gives "invalid character" error for specific structure