This behavior can be common for different LINQ providers and not only EF-specific, because of how C# compiler generates expression tree for your Where expression.
When you specify condition as:
.Where(x => x.BucketRef == bucketId)
and both BucketRef and bucketId are shorts, compiler generates cast from short to int for both parts of comparison, because == operator isn't defined for Short type. This is explained in answer https://stackoverflow.com/a/18584429/869184
As a workaround you can rewrite condition the following way:
.Where(x => x.BucketRef.Equals(bucketId))
This effectively removes cast from comparison.