Core/Loot: Fix some issues with master loot

Thanks to @PortgasDAce for the initial patch

Closes #12732