Hello,

I am trying to reset the values of a vector (1d array) for any values that are outside a bound. In 0.5, I did the following, for instance:

```
x[x.<a] = a[x.<a]
```

This works if I type it in on the console but fails when executed as part of a function with an error of this form:

```
ERROR: LoadError: BoundsError: attempt to access 2-element Array{Float64,1} at index [Base.LogicalIndex(Bool[true; false])]
Stacktrace:
[1] throw_boundserror(::Array{Float64,1}, ::Tuple{Base.LogicalIndex{Int64,BitArray{2}}}) at ./abstractarray.jl:433
[2] checkbounds at ./abstractarray.jl:362 [inlined]
[3] macro expansion at ./multidimensional.jl:441 [inlined]
[4] _getindex at ./multidimensional.jl:438 [inlined]
[5] getindex at ./abstractarray.jl:882 [inlined]
```

x and a are both 1d arrays of Float64.

Any suggestions appreciated.

Thank you.