This issue is still present in Minecraft 17w17a, however when you try to rename a stack, it will just give you 1 renamed item that doesn't really exist; when you remove the remaining 63 items from the anvil, the custom named item disappears, and the item count is back to 64.
I'm also experiencing this bug, though I was going in and out of my portal, doing some things, without any problems. Then, out of the blue, this bug started happening :-\.
This issue is still present in Minecraft 17w17a, however when you try to rename a stack, it will just give you 1 renamed item that doesn't really exist; when you remove the remaining 63 items from the anvil, the custom named item disappears, and the item count is back to 64.