I was able to reproduce this:
[LWJGL] AMD_debug_output message
Category: API ERROR
Message: glGetFramebufferAttachmentParameteriv parameter <pname> has an invalid enum '0x8da7' (GL_INVALID_ENUM)
and from the testing I did it seems like it's an AMD driver bug. I think so because:
a) The result is correct, it actually returns 0 or 1 depending on the attachment type.
b) GL32.GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER works without errors.
c) There's nothing special about glGetFramebufferAttachmentParameter, it works for every other token and it doesn't handle GL_FRAMEBUFFER_ATTACHMENT_LAYERED any differently.