FALCON-926 Fix problems found by findbugs in merlin and merlin-core. Contributed by Raghav Kumar Gautam and Ruslan Ostafiychuk